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



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

Reply via email to