sadanand48 commented on code in PR #4706:
URL: https://github.com/apache/ozone/pull/4706#discussion_r1193449043


##########
hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/debug/ChunkKeyHandler.java:
##########
@@ -115,11 +116,17 @@ protected void execute(OzoneClient client, OzoneAddress 
address)
         ContainerChunkInfo containerChunkInfo = new ContainerChunkInfo();
         long containerId = keyLocation.getContainerID();
         chunkPaths.clear();
-        Pipeline pipeline = keyLocation.getPipeline();
-        if (pipeline.getType() != HddsProtos.ReplicationType.STAND_ALONE) {
-          pipeline = Pipeline.newBuilder(pipeline)
+        Pipeline keyPipeline = keyLocation.getPipeline();
+        boolean isECKey =
+            keyPipeline.getReplicationConfig().getReplicationType() ==
+                HddsProtos.ReplicationType.EC;
+        Pipeline pipeline;
+        if (keyPipeline.getType() != HddsProtos.ReplicationType.STAND_ALONE) {
+          pipeline = Pipeline.newBuilder(keyPipeline)
               .setReplicationConfig(StandaloneReplicationConfig
                   .getInstance(ONE)).build();
+        } else {
+          pipeline = keyPipeline;

Review Comment:
   I see you are using the same pipeline as found in the keyLocation to read 
the data. This was a problem in RATIS pipeline fixed in HDDS-8546 and might 
occur here too if the pipeline is closed.



-- 
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: [email protected]

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