accumulo icon indicating copy to clipboard operation
accumulo copied to clipboard

Fix TabletServer shutdown

Open cheelio opened this issue 2 years ago • 2 comments

Fixes #3282

My attempt to fix the Tabletserver shutdown code.

  • Basically I stripped out the shutdownComplete code from TabletServer because the shutdownComplete variable was never set.
  • Further the halt method in TabletClientHandler seemed to cause unwanted behaviour because it prematurely exits the JVM before shutdown was handled. I enterily removed the Halt.halt() from that method.
  • In TabletServer I think that the Halt.halt call in LockWactcher's lostLock method is placed incorrecly. I guess it makes more sense putting it inside the !serverStopRequested if 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 these unlock calls can be 'dropped'.

cheelio avatar Aug 28 '23 14:08 cheelio

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.

EdColeman avatar Aug 28 '23 14:08 EdColeman

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.

ctubbsii avatar Aug 29 '23 20:08 ctubbsii