amaliujia commented on code in PR #11767:
URL: https://github.com/apache/ozone/pull/11767#discussion_r4408769927
##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/transport/server/ratis/ContainerStateMachine.java:
##########
@@ -752,14 +752,17 @@ void streamPutBlock(ContainerCommandRequestProto request)
throws IOException {
* @return the serialized {@link ContainerCommandResponseProto},
* which is identical on all the peers of the pipeline.
*/
- ByteBuffer streamCommand(ByteBuffer command) throws IOException {
+ ByteBuffer streamCommand(ByteBuffer command, DataChannel channel) throws
IOException {
// unsafeWrap is okay since the command buffer can be modified after this
method has returned.
final ContainerCommandRequestProto request =
ContainerCommandRequestMessage.toProto(
UnsafeByteOperations.unsafeWrap(command), getGroupId());
if (request.getCmdType() != Type.PutBlock) {
throw new StorageContainerException("Unexpected stream command " +
request.getCmdType()
+ ", expected " + Type.PutBlock,
ContainerProtos.Result.MALFORMED_REQUEST);
}
+ if (request.getPutBlock().getSync()) {
+ channel.force(false);
Review Comment:
Should this be `channel.force(request.getPutBlock().getSync())`?
--
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]