Apache9 commented on code in PR #7375:
URL: https://github.com/apache/hbase/pull/7375#discussion_r2594883258


##########
hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/AssignmentManager.java:
##########
@@ -2260,6 +2329,20 @@ public CompletableFuture<Void> 
regionClosedAbnormally(RegionStateNode regionNode
   // The above methods can only be called in TransitRegionStateProcedure(and 
related procedures)
   // 
============================================================================================
 
+  // As soon as a server a crashed, region hosting on that are un-available, 
this method helps to
+  // track those un-available regions. This method can only be called from 
ServerCrashProcedure.
+  public void markRegionsAsCrashed(List<RegionInfo> regionsOnCrashedServer,
+    ServerCrashProcedure scp) {
+    ServerName crashedServerName = scp.getServerName();
+    for (RegionInfo regionInfo : regionsOnCrashedServer) {
+      RegionStateNode node = 
regionStates.getOrCreateRegionStateNode(regionInfo);
+      if (node.getRegionLocation() == crashedServerName) {

Review Comment:
   Ah, it should be equals, and we should log a warn when they do not equal, as 
this method is called before we assign any regions on the crashed region 
server, so the regionsOnCrashedServer should all be on the crashed server.
   
   Let me prepare an addendum. Thanks @d-c-manning !



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to