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/01/07 20:08:19 UTC

[GitHub] [ozone] xiaoyuyao commented on a change in pull request #1762: HDDS-4648. DN should set the block token when Read StateMachine data …

xiaoyuyao commented on a change in pull request #1762:
URL: https://github.com/apache/ozone/pull/1762#discussion_r553561112



##########
File path: hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/transport/server/ratis/ContainerStateMachine.java
##########
@@ -573,16 +573,19 @@ private ByteString readStateMachineData(
         ReadChunkRequestProto.newBuilder()
             .setBlockID(writeChunkRequestProto.getBlockID())
             .setChunkData(chunkInfo);
-    ContainerCommandRequestProto dataContainerCommandProto =
+    ContainerCommandRequestProto.Builder dataContainerCommandProtoBuilder =
         ContainerCommandRequestProto.newBuilder(requestProto)
-            .setCmdType(Type.ReadChunk).setReadChunk(readChunkRequestProto)
-            .build();
+            .setCmdType(Type.ReadChunk).setReadChunk(readChunkRequestProto);
+    if (requestProto.hasEncodedToken()) {
+      dataContainerCommandProtoBuilder.setEncodedToken(

Review comment:
       You are right, the constructor does copy the token if exist. I will close this one. 




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



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org