adoroszlai commented on a change in pull request #1762:
URL: https://github.com/apache/ozone/pull/1762#discussion_r552984734
##########
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:
I think `newBuilder(requestProto)` sets all fields from `requestProto`,
including encoded token, so this seems unnecessary. Am I missing something?
----------------------------------------------------------------
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]