GlenGeng commented on a change in pull request #1314:
URL: https://github.com/apache/ozone/pull/1314#discussion_r535173512



##########
File path: 
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/node/SCMNodeManager.java
##########
@@ -656,8 +669,57 @@ public void setContainers(DatanodeDetails datanodeDetails,
   // Since datanode commands are added through event queue, onMessage method
   // should take care of adding commands to command queue.
   // Refactor and remove all the usage of this method and delete this method.
+  /**
+   * Only leader SCM can send SCMCommand to datanode, and needs record its
+   * term in the command so that datanode can distinguish commands from stale
+   * leader SCM by comparing term.
+   *
+   * There are 7 SCMCommands:

Review comment:
       Good point. I've removed the comments for good.
   
   As discussed in design of SCMContext, we will query and inject the term 
before firing event of DATANODE_COMMAND explicitly for all related places. I 
will revisit this code in dev of phase 2.0.




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



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

Reply via email to