teamconfx opened a new pull request, #7666:
URL: https://github.com/apache/hbase/pull/7666
### Summary of Changes
### WorkerAssigner.java:
- Added null checks in serverAdded() to prevent NPE
- Added stop() method to unregister from ServerManager
### SnapshotManager.java
The stop() method is called via mpmHost.stop("server shutting down.") in
HMaster.stopServiceThreads(). Added:
```java
if (verifyWorkerAssigner != null) {
verifyWorkerAssigner.stop();
}
```
### SplitWALManager.java (end of file)
Added new stop() method:
```java
public void stop() {
splitWorkerAssigner.stop();
}
```
### HMaster.java
Added explicit call before stopProcedureExecutor():
```java
if (this.splitWALManager != null) {
this.splitWALManager.stop();
}
```
Call Hierarchy During Shutdown
HMaster.stopServiceThreads()
├── splitWALManager.stop() // HBASE-29804: Added before
stopProcedureExecutor
│ └── splitWorkerAssigner.stop() // Unregisters from ServerManager
├── stopProcedureExecutor() // Sets procedureExecutor = null
│ ...
└── mpmHost.stop()
└── SnapshotManager.stop()
└── verifyWorkerAssigner.stop() // HBASE-29804: Unregisters from
ServerManager
The null check in serverAdded() is the primary safety mechanism since
there's a window between stopProcedureExecutor() and mpmHost.stop() where
SnapshotManager's WorkerAssigner is still registered. The stop() calls ensure
proper cleanup.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]