bharathv commented on a change in pull request #1039: HBASE-23647: Make
MasterRegistry the default impl.
URL: https://github.com/apache/hbase/pull/1039#discussion_r369996228
##########
File path:
hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMasterShutdown.java
##########
@@ -133,11 +134,19 @@ public void
testMasterShutdownBeforeStartingAnyRegionServer() throws Exception {
util.startMiniZKCluster();
util.createRootDir();
final LocalHBaseCluster cluster =
- new LocalHBaseCluster(conf, NUM_MASTERS, NUM_RS, HMaster.class,
+ new LocalHBaseCluster(conf, NUM_MASTERS, 0, NUM_RS, HMaster.class,
MiniHBaseCluster.MiniHBaseClusterRegionServer.class);
final int MASTER_INDEX = 0;
final MasterThread master = cluster.getMasters().get(MASTER_INDEX);
master.start();
+ // Switching to master registry exposed a race in the master bootstrap
that can result in a
+ // lost shutdown command (HBASE-8422). The race is essentially because the
server manager in
+ // HMaster is not initialized by the time shutdown() RPC (below) is made to
+ // the master. The reason it was not happening earlier is because the
connection creation with
+ // ZK registry is so slow that by then the server manager is init'ed thus
masking the problem.
+ // For now, I'm putting a wait() here to workaround the issue, I think the
fix for it is a
+ // little delicate and needs to be done separately.
+ Waiter.waitFor(conf, 5000, () -> master.getMaster().getServerManager() !=
null);
Review comment:
> BTW, does test suite run faster now?
So the initial impression is that the individual tests seem to run a little
faster (in my local runs, anywhere a connection is involved), but I don't have
actual numbers from the Jenkins jobs since the PR jenkins run doesn't always
run the full suite. Once this patch makes it to the branch, we will some
numbers to compare.
----------------------------------------------------------------
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