avijayanhwx commented on a change in pull request #1610: HDDS-1868. Ozone 
pipelines should be marked as ready only after the leader election is complete.
URL: https://github.com/apache/hadoop/pull/1610#discussion_r332649863
 
 

 ##########
 File path: 
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/pipeline/PipelineReportHandler.java
 ##########
 @@ -102,12 +106,24 @@ private void processPipelineReport(PipelineReport 
report, DatanodeDetails dn)
       return;
     }
 
+    if (report.hasLeaderID()) {
+      Map<UUID, ByteString> ids =
+          reportedLeadersForPipeline.computeIfAbsent(pipelineID,
+              k -> new HashMap<>());
+      ids.put(dn.getUuid(), report.getLeaderID());
+    }
+
     if (pipeline.getPipelineState() == Pipeline.PipelineState.ALLOCATED) {
 
 Review comment:
   This will not cover OPEN pipelines where there is a leader election. We need 
to update SCM's internal pipeline's leaderId to the new leader for those leader 
elections as well. 

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


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org

Reply via email to