bharathv commented on a change in pull request #2899:
URL: https://github.com/apache/hbase/pull/2899#discussion_r562793767
##########
File path:
hbase-server/src/main/java/org/apache/hadoop/hbase/master/normalizer/SimpleRegionNormalizer.java
##########
@@ -222,8 +223,12 @@ public void setMasterRpcServices(MasterRpcServices
masterRpcServices) {
private long getRegionSize(HRegionInfo hri) {
ServerName sn = masterServices.getAssignmentManager().getRegionStates().
getRegionServerOfRegion(hri);
- RegionLoad regionLoad = masterServices.getServerManager().getLoad(sn).
- getRegionsLoad().get(hri.getRegionName());
+ ServerLoad load = masterServices.getServerManager().getLoad(sn);
+ if (load == null) {
+ LOG.debug(hri.getRegionNameAsString() + " was not found on any server");
Review comment:
@mnpoonia Ya, nvm. I was hoping we'd add the same check here to avoid an
unnecessary RPC to merge (when we know it will fail) but I think we are still
prone to other race conditions (depending on when the master assignment state
is updated), so perhaps better to keep the code simple as it is today and defer
the check to when the merge is actually run.
> True, most likely this would mean that region is in transition because RS
hosting this region went offline.
@virajjasani I see what you mean but theoretically it could also be possible
that this region is online elsewhere in which case the log is misleading, may
be slightly reword to clarify it? (sorry for the nitpick)..
----------------------------------------------------------------
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]