You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "aryangupta1998 (via GitHub)" <gi...@apache.org> on 2025/05/07 11:41:23 UTC

[PR] HDDS-12938. Refactor OneReplicaPipelineSafeModeRule to not use PipelineReportFromDatanode [ozone]

aryangupta1998 opened a new pull request, #8410:
URL: https://github.com/apache/ozone/pull/8410

   ## What changes were proposed in this pull request?
   
   Currently, OneReplicaPipelineSafeModeRule depends on processing of PipelineReportFromDatanode to validate the rule. We should avoid processing any reports in Safamode rule and depend on the PipelineManager here.
   
   ## What is the link to the Apache JIRA
   
   https://issues.apache.org/jira/browse/HDDS-12938
   
   ## How was this patch tested?
   
   Tested Manually.


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


Re: [PR] HDDS-12938. Refactor OneReplicaPipelineSafeModeRule to not use PipelineReportFromDatanode [ozone]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #8410:
URL: https://github.com/apache/ozone/pull/8410#issuecomment-3619001489

   This PR has been marked as stale due to 21 days of inactivity. Please comment or remove the stale label to keep it open. Otherwise, it will be automatically closed in 7 days.


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


Re: [PR] HDDS-12938. Refactor OneReplicaPipelineSafeModeRule to not use PipelineReportFromDatanode [ozone]

Posted by "aryangupta1998 (via GitHub)" <gi...@apache.org>.
aryangupta1998 commented on code in PR #8410:
URL: https://github.com/apache/ozone/pull/8410#discussion_r2085266766


##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/safemode/OneReplicaPipelineSafeModeRule.java:
##########
@@ -171,6 +185,25 @@ public synchronized void refresh(boolean forceRefresh) {
     }
   }
 
+  private void updateReportedPipelineSet() {
+    List<Pipeline> openRatisPipelines =
+        pipelineManager.getPipelines(RatisReplicationConfig.getInstance(ReplicationFactor.THREE),
+            Pipeline.PipelineState.OPEN);
+
+    for (Pipeline pipeline : openRatisPipelines) {
+      PipelineID pipelineID = pipeline.getId();
+      boolean allDNsPipelineReported = pipeline.getNodeSet().size() == 3;

Review Comment:
   This check ensures that all three DN have reported that particular pipeline.



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


Re: [PR] HDDS-12938. Refactor OneReplicaPipelineSafeModeRule to not use PipelineReportFromDatanode [ozone]

Posted by "peterxcli (via GitHub)" <gi...@apache.org>.
peterxcli commented on code in PR #8410:
URL: https://github.com/apache/ozone/pull/8410#discussion_r2085103522


##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/safemode/OneReplicaPipelineSafeModeRule.java:
##########
@@ -171,6 +185,25 @@ public synchronized void refresh(boolean forceRefresh) {
     }
   }
 
+  private void updateReportedPipelineSet() {
+    List<Pipeline> openRatisPipelines =
+        pipelineManager.getPipelines(RatisReplicationConfig.getInstance(ReplicationFactor.THREE),
+            Pipeline.PipelineState.OPEN);
+
+    for (Pipeline pipeline : openRatisPipelines) {
+      PipelineID pipelineID = pipeline.getId();
+      boolean allDNsPipelineReported = pipeline.getNodeSet().size() == 3;

Review Comment:
   Could you explain why line 195 check is added? The old logic seems not check that. TIA!



##########
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/scm/pipeline/Pipeline.java:
##########
@@ -337,6 +339,22 @@ void reportDatanode(DatanodeDetails dn) throws IOException {
     nodeStatus.put(dn, System.currentTimeMillis());
   }
 
+  @VisibleForTesting
+  public DatanodeDetails removeFirstFromNodeStatus() {

Review Comment:
   I think these two `removeFirstFromNodeStatus` and `setInNodeStatus` can be removed. To make a 2-node pipeline, use `pipelineManager.deletePipeline` to delete original one and add a 2-node one back through it.



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


Re: [PR] HDDS-12938. Refactor OneReplicaPipelineSafeModeRule to not use PipelineReportFromDatanode [ozone]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #8410:
URL: https://github.com/apache/ozone/pull/8410#issuecomment-3519267886

   This PR has been marked as stale due to 21 days of inactivity. Please comment or remove the stale label to keep it open. Otherwise, it will be automatically closed in 7 days.


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


Re: [PR] HDDS-12938. Refactor OneReplicaPipelineSafeModeRule to not use PipelineReportFromDatanode [ozone]

Posted by "aryangupta1998 (via GitHub)" <gi...@apache.org>.
aryangupta1998 commented on code in PR #8410:
URL: https://github.com/apache/ozone/pull/8410#discussion_r2085266766


##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/safemode/OneReplicaPipelineSafeModeRule.java:
##########
@@ -171,6 +185,25 @@ public synchronized void refresh(boolean forceRefresh) {
     }
   }
 
+  private void updateReportedPipelineSet() {
+    List<Pipeline> openRatisPipelines =
+        pipelineManager.getPipelines(RatisReplicationConfig.getInstance(ReplicationFactor.THREE),
+            Pipeline.PipelineState.OPEN);
+
+    for (Pipeline pipeline : openRatisPipelines) {
+      PipelineID pipelineID = pipeline.getId();
+      boolean allDNsPipelineReported = pipeline.getNodeSet().size() == 3;

Review Comment:
   This check ensures that all three DN have reported that particular pipeline. We can do pipeline.getNodeSet().size() > 1 to check for at least one replica!



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


Re: [PR] HDDS-12938. Refactor OneReplicaPipelineSafeModeRule to not use PipelineReportFromDatanode [ozone]

Posted by "aryangupta1998 (via GitHub)" <gi...@apache.org>.
aryangupta1998 closed pull request #8410: HDDS-12938. Refactor OneReplicaPipelineSafeModeRule to not use PipelineReportFromDatanode
URL: https://github.com/apache/ozone/pull/8410


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