sumitagrawl commented on code in PR #5183:
URL: https://github.com/apache/ozone/pull/5183#discussion_r1295376015
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/key/OMKeyCommitRequest.java:
##########
@@ -217,9 +218,19 @@ public OMClientResponse
validateAndUpdateCache(OzoneManager ozoneManager,
// creation and key commit, old versions will be just overwritten and
// not kept. Bucket versioning will be effective from the first key
// creation after the knob turned on.
+ boolean isPreviousCommitHsync = false;
Map<String, RepeatedOmKeyInfo> oldKeyVersionsToDeleteMap = null;
OmKeyInfo keyToDelete =
omMetadataManager.getKeyTable(getBucketLayout()).get(dbOzoneKey);
+ if (null != keyToDelete) {
+ final String clientIdString
+ = String.valueOf(commitKeyRequest.getClientID());
+ isPreviousCommitHsync = java.util.Optional.ofNullable(keyToDelete)
Review Comment:
Yes, it will hit the logic and will get Hsync flag from keyToDelete as
verified. This is handled with another flag isPreviousCommitHsync. And
Uncommited will be cleaned as normal HSync flag is false.
--
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]