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 2021/07/14 20:04:39 UTC

[GitHub] [ozone] hanishakoneru commented on a change in pull request #1494: HDDS-4330. Bootstrap new OM node

hanishakoneru commented on a change in pull request #1494:
URL: https://github.com/apache/ozone/pull/1494#discussion_r669915784



##########
File path: hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java
##########
@@ -1339,7 +1339,38 @@ public void bootstrap(OMNodeDetails newOMNode) throws IOException {
   }
 
   /**
-   * Add a new OM Node to the HA cluster. This call comes from OMRatisServer
+   * When OMStateMachine receives a configuration change update, it calls
+   * this function to update the peers list, if required.
+   */
+  public void updatePeerList(List<String> omNodeIds) {
+    List<String> ratisServerPeerIdsList = omRatisServer.getPeerIds();
+    for (String omNodeId : omNodeIds) {
+      if (getOMNodeId().equals(omNodeId)) {

Review comment:
       > In bootstrap case, local node is not added to ratis server peer list.
   
   Yes. This is because the local node is not part of the ratis ring yet. When the SetConfiguration is executed, this node would be added to the peer list.
   
   > While reading more, I have observed that before this change, we have not added local OM node to peer node list before(raftPeers). Should we have the same behavior?. So, should we remove adding local node to peer list?
   
   Before this change also the local OM node was added to the peer list in OMRatisServer. Are you referring to any other class?




-- 
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: issues-unsubscribe@ozone.apache.org

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