smengcl commented on code in PR #11678:
URL: https://github.com/apache/ozone/pull/11678#discussion_r4345232710
##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/fs/ozone/TestLeaseRecovery.java:
##########
@@ -226,6 +232,38 @@ public void testRecovery(int dataSize) throws Exception {
verifyData(data, dataSize * 2, file, fs);
}
+ @ParameterizedTest
+ @ValueSource(booleans = {false, true})
Review Comment:
nit: the `true` case was already fixed by HDDS-16746, and
`TestContainerStateMachineStream#testReadAfterHsync` covers both modes. Since
this test also depends on several client internals (`SelectorOutputStream`,
`OzoneFSDataStreamOutput`, `KeyDataStreamOutput`), consider running only the
Raft PutBlock mode here.
##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/KeyValueHandler.java:
##########
@@ -675,6 +675,7 @@ ContainerCommandResponseProto handlePutBlock(
ContainerProtos.BlockData data = request.getPutBlock().getBlockData();
BlockData blockData = BlockData.getFromProtoBuf(data);
Objects.requireNonNull(blockData, "blockData == null");
+ chunkManager.drainStreamBuffers(kvContainer, blockData.getBlockID(),
blockData.getSize());
Review Comment:
nit: a comment here would help readers who do not know about the stream
buffering, e.g.
```java
// A data stream keeps the end of the data in memory; it must be in the
block file before the length is committed.
```
--
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]