Apache9 commented on a change in pull request #852: HBASE-23322 [hbck2] 
Simplification on HBCKSCP scheduling
URL: https://github.com/apache/hbase/pull/852#discussion_r348251753
 
 

 ##########
 File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/AssignmentManager.java
 ##########
 @@ -1502,26 +1503,38 @@ public long submitServerCrash(ServerName serverName, 
boolean shouldSplitWal) {
     // server state to CRASHED, we will no longer accept the 
reportRegionStateTransition call from
     // this server. This is used to simplify the implementation for TRSP and 
SCP, where we can make
     // sure that, the region list fetched by SCP will not be changed any more.
-    serverNode.writeLock().lock();
+    if (serverNode != null) {
 
 Review comment:
   I think here we'd better extract a special method for handling the unknown 
server case? It will make the code much cleaner, now lots of serverNode != null 
in the code base which means the code hard to understand...

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

Reply via email to