kuenishi commented on pull request #2813:
URL: https://github.com/apache/ozone/pull/2813#issuecomment-1058753717
@hanishakoneru Oops, sorry. I updated accordingly.
By the way, do you know why OMKeyRequest does not have any protected members
that can be used in validateAndUpdateCache() across many inherited classes? If
that's possible, for example, this pull request can be a bit simpler if the
requests aren't passed among OM buffers like this:
```java
previousOmKeyInfo = Optional.fromNullable(
omMetadataManager.getKeyTable(getBucketLayout()).get(dbKey));
RepeatedOmKeyInfo oldKeyVersionsToDelete = getOldVersionsToCleanUp(
omMetadataManager, trxnLogIndex,
omBucketInfo.getIsVersionEnabled(),
ozoneManager.isRatisEnabled());
long correctedSpace = omKeyInfo.getDataSize() * factor -
locationInfoList.size() * scmBlockSize * factor -
previousKeyDataSize();
```
I drafted a full commit
(https://github.com/kuenishi/ozone/commit/3e539bf7da81534b630cc4df669fb9a02dc4ca29)
. Please check it out if you're interested.
--
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]