hanishakoneru commented on pull request #2813:
URL: https://github.com/apache/ozone/pull/2813#issuecomment-1058674866
@kuenishi, I still see that we are reading the key from DB twice.
For example, in _OMKeyCommitRequest_ lines#217-224:
```
RepeatedOmKeyInfo oldKeyVersionsToDelete = null;
OmKeyInfo keyToDelete =
omMetadataManager.getKeyTable(getBucketLayout()).get(dbOzoneKey);
if (keyToDelete != null && !omBucketInfo.getIsVersionEnabled()) {
oldKeyVersionsToDelete = getOldVersionsToCleanUp(dbOzoneKey,
omMetadataManager, omBucketInfo.getIsVersionEnabled(),
trxnLogIndex, ozoneManager.isRatisEnabled());
}
```
_dbOzoneKey_ is read from DB on line#219 and again in
_getOldVersionsToCleanUp()_ (_OMKeyRequest_ line#801).
Also, we do not need to do versioning enabled check in
_getOldVersionsToCleanUp()_ as it is being checked before that method is called.
--
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]