You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2020/12/03 11:25:45 UTC

[GitHub] [ozone] timmylicheng commented on a change in pull request #1314: HDDS-3988: DN can distinguish SCMCommand from stale leader SCM

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



##########
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:
       Nit: Try not to list all the commands by name. It would be hard to maintain the correctness of the comments.




----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org