ndimiduk commented on a change in pull request #1141: HBASE-23808 [Flakey Test]
TestMasterShutdown#testMasterShutdownBefore…
URL: https://github.com/apache/hbase/pull/1141#discussion_r377993610
##########
File path:
hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
##########
@@ -2804,9 +2804,15 @@ public MemoryBoundedLogMessageBuffer
getRegionServerFatalLogBuffer() {
* Master runs a coordinated stop of all RegionServers and then itself.
*/
public void shutdown() throws IOException {
+ if (!isInitialized()) {
+ LOG.info("Shutdown requested but we're not the active master. Proceeding
as a stop.");
Review comment:
I think another reasonable alternative here is to reject the RPC back to the
client with some form of `DoNotRetryIOException` and a message about cannot
shutdown from an inactive master.
What do you think?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services