This is an automated email from the ASF dual-hosted git repository.

adoroszlai pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ozone.git


The following commit(s) were added to refs/heads/master by this push:
     new 12caaeab02 HDDS-8922. Random EC read pipeline ID causes XceiverClient 
cache churn (#4971)
12caaeab02 is described below

commit 12caaeab0292cc847eda01d79662195b43596197
Author: hao guo <[email protected]>
AuthorDate: Mon Jun 26 04:15:36 2023 +0800

    HDDS-8922. Random EC read pipeline ID causes XceiverClient cache churn 
(#4971)
---
 .../java/org/apache/hadoop/ozone/client/io/ECBlockInputStream.java | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git 
a/hadoop-hdds/client/src/main/java/org/apache/hadoop/ozone/client/io/ECBlockInputStream.java
 
b/hadoop-hdds/client/src/main/java/org/apache/hadoop/ozone/client/io/ECBlockInputStream.java
index 8ad8f8851e..ea4f3d743f 100644
--- 
a/hadoop-hdds/client/src/main/java/org/apache/hadoop/ozone/client/io/ECBlockInputStream.java
+++ 
b/hadoop-hdds/client/src/main/java/org/apache/hadoop/ozone/client/io/ECBlockInputStream.java
@@ -181,12 +181,13 @@ public class ECBlockInputStream extends 
BlockExtendedInputStream {
       // single location for the block index we want to read. The EC blocks are
       // indexed from 1 to N, however the data locations are stored in the
       // dataLocations array indexed from zero.
+      DatanodeDetails dataLocation = dataLocations[locationIndex];
       Pipeline pipeline = Pipeline.newBuilder()
           .setReplicationConfig(StandaloneReplicationConfig.getInstance(
               HddsProtos.ReplicationFactor.ONE))
-          .setNodes(Arrays.asList(dataLocations[locationIndex]))
-          .setId(PipelineID.randomId()).setReplicaIndexes(
-              ImmutableMap.of(dataLocations[locationIndex], locationIndex + 1))
+          .setNodes(Arrays.asList(dataLocation))
+          .setId(PipelineID.valueOf(dataLocation.getUuid())).setReplicaIndexes(
+              ImmutableMap.of(dataLocation, locationIndex + 1))
           .setState(Pipeline.PipelineState.CLOSED)
           .build();
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to