kuenishi commented on a change in pull request #2433:
URL: https://github.com/apache/ozone/pull/2433#discussion_r726666619
##########
File path:
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/key/OMKeyCommitRequest.java
##########
@@ -191,6 +195,21 @@ public OMClientResponse
validateAndUpdateCache(OzoneManager ozoneManager,
// Set the UpdateID to current transactionLogIndex
omKeyInfo.setUpdateID(trxnLogIndex, ozoneManager.isRatisEnabled());
+ // TODO(HDDS-5461): Currently, old versions are all moved to the delete
+ // table. To preserve old version(s) in the key table on overwrite,
+ // merge old versions to omKeyInfo here instead of moving the to the
+ // delete table.
+ // If bucket versioning is turned on somehow, overwritten blocks will
+ // leak and never collected by block deletion service. Keep it off.
+ RepeatedOmKeyInfo keysToDelete = getOldVersionsToCleanUp(dbOzoneKey,
+ omMetadataManager, omBucketInfo.getIsVersionEnabled(), trxnLogIndex,
+ ozoneManager.isRatisEnabled());
+ if (omMetadataManager.getKeyTable().isExist(dbOzoneKey)
+ && omBucketInfo.getIsVersionEnabled()) {
+ // TODO: delete this warning after versioning supported.
+ LOG.warn("Overwritten blocks of {}/{}/{} may have leaked.",
Review comment:
I thought there was a potential race, but it wasn't as far as I
reconsidered. I've removed this section.
--
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]