Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
0.94.0
-
None
-
None
-
all
-
Reviewed
Description
The current implementation of HRegionServer#stop is
public void stop(final String msg) { this.stopped = true; LOG.info("STOPPED: " + msg); synchronized (this) { // Wakes run() if it is sleeping notifyAll(); // FindBugs NN_NAKED_NOTIFY } }
The notification is sent on the wrong object and does nothing. As a consequence, the region server continues to sleep instead of waking up and stopping immediately. A correct implementation is:
public void stop(final String msg) { this.stopped = true; LOG.info("STOPPED: " + msg); // Wakes run() if it is sleeping sleeper.skipSleepCycle(); }
Then the region server stops immediately. This makes the region server stops 0,5s faster on average, which is quite useful for unit tests.
However, with this fix, TestRegionServerCoprocessorExceptionWithAbort does not work.
It likely because the code does no expect the region server to stop that fast. See HBASE-4832
Attachments
Attachments
Issue Links
- is required by
-
HBASE-4602 Make the suite run in at least half the time
- Closed
- requires
-
HBASE-4832 TestRegionServerCoprocessorExceptionWithAbort fails if the region server stops too fast
- Closed