Xushaohong commented on code in PR #3778:
URL: https://github.com/apache/ozone/pull/3778#discussion_r1000270745
##########
hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/request/key/TestOMKeyCommitRequest.java:
##########
@@ -190,6 +191,93 @@ public void testValidateAndUpdateCache() throws Exception {
omKeyInfo.getLatestVersionLocations().getLocationList());
}
+ @Test
+ public void testValidateAndUpdateCacheWithUncommittedBlocks()
+ throws Exception {
+
+ // allocated block list
+ List<KeyLocation> allocatedKeyLocationList = getKeyLocation(5, 0);
+
+ List<OmKeyLocationInfo> allocatedBlockList = allocatedKeyLocationList
+ .stream().map(OmKeyLocationInfo::getFromProtobuf)
+ .collect(Collectors.toList());
+
+ // committed block list, with three blocks different with the allocated
+ List<KeyLocation> committedKeyLocationList = getKeyLocation(5, 3);
Review Comment:
Thx @errose28 for the review!
Actually committing the unknown block from the client side is still
possible, https://github.com/apache/ozone/pull/2108 this work is on the server
side.
But I have done some improvements like what you said, PTAL~
--
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]