virajjasani commented on code in PR #5330:
URL: https://github.com/apache/hadoop/pull/5330#discussion_r1095229521


##########
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BPOfferService.java:
##########
@@ -679,16 +679,19 @@ boolean processCommandFromActor(DatanodeCommand cmd,
       actor.reRegister();
       return false;
     }
+    boolean isActiveActor;
     writeLock();
     try {
-      if (actor == bpServiceToActive) {
-        return processCommandFromActive(cmd, actor);
-      } else {
-        return processCommandFromStandby(cmd, actor);
-      }
+      isActiveActor = actor == bpServiceToActive;
     } finally {
       writeUnlock();
     }
+
+    if (actor == bpServiceToActive) {
+      return processCommandFromActive(cmd, actor);
+    } else {
+      return processCommandFromStandby(cmd, actor);
+    }

Review Comment:
   Even before HDFS-6788, this part was at least covered by synchronized lock 
on the actor thread



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to