ashishkumar50 commented on code in PR #6495:
URL: https://github.com/apache/ozone/pull/6495#discussion_r1565686266
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/key/OMKeyDeleteRequest.java:
##########
@@ -180,7 +185,7 @@ public OMClientResponse validateAndUpdateCache(OzoneManager
ozoneManager, TermIn
omClientResponse = new OMKeyDeleteResponse(
omResponse.setDeleteKeyResponse(DeleteKeyResponse.newBuilder())
.build(), omKeyInfo, ozoneManager.isRatisEnabled(),
- omBucketInfo.copyObject(), dbOpenKey);
+ omBucketInfo.copyObject(), openKeyInfoMap);
Review Comment:
Done
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/response/key/OMKeyDeleteResponse.java:
##########
@@ -83,22 +83,26 @@ public void addToDBBatch(OMMetadataManager
omMetadataManager,
omMetadataManager.getBucketKey(omBucketInfo.getVolumeName(),
omBucketInfo.getBucketName()), omBucketInfo);
- // Remove open key (necessary when the file is hsync'ed but not committed)
- if (dbOpenKey != null) {
- omMetadataManager.getOpenKeyTable(getBucketLayout()).deleteWithBatch(
- batchOperation, dbOpenKey);
+ // necessary when the file is hsync'ed but not committed
+ // Update metadata which will be used to cleanup openKey in
openKeyCleanupService
+ if (!openKeyInfoMap.isEmpty()) {
+ for (Map.Entry<String, OmKeyInfo> entry : openKeyInfoMap.entrySet()) {
+ omMetadataManager.getOpenKeyTable(getBucketLayout()).putWithBatch(
+ batchOperation, entry.getKey(), entry.getValue());
Review Comment:
Done
--
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]