szetszwo commented on code in PR #4761:
URL: https://github.com/apache/ozone/pull/4761#discussion_r1202746596
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/key/OMKeyCommitRequest.java:
##########
@@ -217,8 +217,12 @@ public OMClientResponse
validateAndUpdateCache(OzoneManager ozoneManager,
omKeyInfo.setModificationTime(commitKeyArgs.getModificationTime());
// Update the block length for each block, return the allocated but
// uncommitted blocks
- List<OmKeyLocationInfo> uncommitted = omKeyInfo.updateLocationInfoList(
- locationInfoList, false);
+ List<OmKeyLocationInfo> uncommitted;
+ if (isHSync) {
+ uncommitted = new ArrayList<>();
Review Comment:
Use `Collections.emptyList()` since it only needs a readonly list.
##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/fs/ozone/TestHSync.java:
##########
@@ -160,6 +160,28 @@ public void testOfsHSync() throws Exception {
}
}
+ @Test
+ public void testUncommittedBlocks() throws Exception {
Review Comment:
How could this test verify the fix?
--
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]