ashishkumar50 commented on code in PR #6495:
URL: https://github.com/apache/ozone/pull/6495#discussion_r1565175998
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/key/OMDirectoriesPurgeRequestWithFSO.java:
##########
@@ -120,7 +120,11 @@ public OMClientResponse
validateAndUpdateCache(OzoneManager ozoneManager, TermIn
long parentId = keyInfo.getParentObjectID();
dbOpenKey = omMetadataManager.getOpenFileName(path.getVolumeId(),
path.getBucketId(),
parentId, keyInfo.getFileName(), hsyncClientId);
- openKeyRemovalList.add(dbOpenKey);
+ OmKeyInfo openKeyInfo =
omMetadataManager.getOpenKeyTable(getBucketLayout()).get(dbOpenKey);
+ if (openKeyInfo != null) {
+ openKeyInfo.getMetadata().put(DELETED_HSYNC_KEY, "true");
Review Comment:
I think this problem exist even for non `hsync` keys as well.
When Client1 is writing a key, and some other client comes and deletes the
directory or bucket and recreate again. Client1 will fail to commit the key and
also will not able to write same key till `openKey` is cleaned up or it may
overwrite.
--
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]