-
Notifications
You must be signed in to change notification settings - Fork 588
HDDS-4375. OM changes the block length when receives truncate request #1517
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| * Truncates an existing key. | ||
| * | ||
| * @param args the args of the key. | ||
| * @throws IOException |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you please finish this java doc, there are many same issue in this PR.
For example if there is an I/O error while performing the call
|
@runzhiwang Thank you for your contribution, It's looks good overall, left a minor comments. |
captainzmc
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM overall. Just few minor comments inline.
| } | ||
|
|
||
| @Override | ||
| @SuppressWarnings("methodlength") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| @SuppressWarnings("methodlength") |
|
|
||
| // update usedBytes atomically. | ||
| omVolumeArgs.getUsedBytes().add(-quotaReleased); | ||
| omBucketInfo.getUsedBytes().add(-quotaReleased); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here the logic to update quota can be removed and added with a TODO. Since the way to update quota will be changed in #1489, we will no longer rely on volume usedBytes and will no longer use LongAdder. Calculate quotaReleased logic can be retained.
|
|
||
| private TestOMRequestUtils() { | ||
| //Do nothing | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Useless methods can be deleted
|
/pending |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Marking this issue as un-mergeable as requested.
Please use /ready comment when it's resolved.
Please note that the PR will be closed after 21 days of inactivity from now. (But can be re-opened anytime later...)
/pending
|
Thank you very much for the patch. I am closing this PR temporarily as there was no activity recently and it is waiting for response from its author. It doesn't mean that this PR is not important or ignored: feel free to reopen the PR at any time. It only means that attention of committers is not required. We prefer to keep the review queue clean. This ensures PRs in need of review are more visible, which results in faster feedback for all PRs. If you need ANY help to finish this PR, please contact the community on the mailing list or the slack channel." |
What changes were proposed in this pull request?
When OM receives truncate(key, newLength),in the keyTable, OM deletes the blocks which are fully truncated, and updates the block length which is partially truncated, then return success to client.
Ozone client read key according to the block length got from OM, which has already been implemented.
So, with this PR, Ozone client can read the truncated key with newLength, when the truncate operation returns success.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-4375
How was this patch tested?
new UT and IT