z3n3r commented on a change in pull request #2445: URL: https://github.com/apache/hbase/pull/2445#discussion_r506778311
########## File path: hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/AssignmentManager.java ########## @@ -430,11 +553,19 @@ private boolean isCarryingRegion(final ServerName serverName, final RegionInfo r return(node != null && serverName.equals(node.getRegionLocation())); } - private RegionInfo getMetaForRegion(final RegionInfo regionInfo) { - //if (regionInfo.isMetaRegion()) return regionInfo; - // TODO: handle multiple meta. if the region provided is not meta lookup - // which meta the region belongs to. - return RegionInfoBuilder.FIRST_META_REGIONINFO; + /** + * Check hbase:meta is up and ready for reading. For use during Master startup only. + * @return True if meta is UP and online and startup can progress. Otherwise, meta is not online + * and we will hold here until operator intervention. + */ + @VisibleForTesting + public boolean waitForMetaOnline() { Review comment: This is only during master startup/initialization. We can do as a follow-up as that'd be a big change. As currently RegionStates is mainly used after it has read all the contents of meta. That would be a change in expectation if it would now be possible that RegionStates may not know about certain regions. Eg it would be possible that SCP will only recover regions that RegionStates knows about. And we would need a mechanism to cover for when other regions of meta are loaded down the road. Alternatively we can just speedup/parallelize meta assignment until that is no longer good enough. Note also that as part of startup/initialization. We would need to scan meta to bootstrap RegionStates. Internally we parallelized the scanning of meta during startup. I'll remember to add that here too. ---------------------------------------------------------------- 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: us...@infra.apache.org