accumulo
accumulo copied to clipboard
Fix TabletServer shutdown
Fixes #3282
My attempt to fix the Tabletserver shutdown code.
- Basically I stripped out the
shutdownCompletecode fromTabletServerbecause theshutdownCompletevariable was never set. - Further the
haltmethod inTabletClientHandlerseemed to cause unwanted behaviour because it prematurely exits the JVM before shutdown was handled. I enterily removed theHalt.halt()from that method. - In
TabletServerI think that the Halt.halt call inLockWactcher's lostLock method is placed incorrecly. I guess it makes more sense putting it inside the!serverStopRequestedif statement. - After making these changes, the shutdown code is executed correctly but that also caused the
tabletServerLock.unlock()was called twice, causing a NullPointerException when trying to unlock for the second time. I am not entirely sure weather one of theseunlockcalls can be 'dropped'.
Did you intend to target this for 3.1 (current main) or as a fix to 2.1.3? You may need to adjust the target branch and resolve changes for 2.1.3.
Did you intend to target this for 3.1 (current main) or as a fix to 2.1.3? You may need to adjust the target branch and resolve changes for 2.1.3.
This is not an urgent issue for 2.1 and not worth any behavior changes there. I wouldn't suggest targeting that branch. The main branch should suffice, pending the outcome of code reviews.