smengcl commented on code in PR #5183:
URL: https://github.com/apache/ozone/pull/5183#discussion_r1294012655
##########
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:
If there are two clients opening the same key (two entries in `OpenKeyTable`
with the same key path, but different `clientId` suffix) and perform hsync,
will the blocks still get correctly discarded with this change?
Currently the logic doesn't prevent two clients from hsync'ing on the same
key.
--
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]