sumitagrawl commented on code in PR #5183:
URL: https://github.com/apache/ozone/pull/5183#discussion_r1295383046


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/key/OMKeyCommitRequest.java:
##########
@@ -248,7 +259,7 @@ public OMClientResponse validateAndUpdateCache(OzoneManager 
ozoneManager,
       long correctedSpace = omKeyInfo.getReplicatedSize();
       // if keyToDelete isn't null, usedNamespace needn't check and
       // increase.
-      if (keyToDelete != null && isHSync) {
+      if (keyToDelete != null && (isHSync || isPreviousCommitHsync)) {
         correctedSpace -= keyToDelete.getReplicatedSize();
         checkBucketQuotaInBytes(omMetadataManager, omBucketInfo,
             correctedSpace);

Review Comment:
   In normal scenario, when another client performs commit, it do overwrite the 
previous client commit and delete its block. But For Hsync, this scenario can 
cause dataloss and this needs to be handled. Created another JIRA to track this 
scenario,
   https://issues.apache.org/jira/browse/HDDS-9176
   



-- 
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]

Reply via email to