Skip to content

Conversation

@runzhiwang
Copy link
Contributor

What changes were proposed in this pull request?

  1. 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.

  2. Ozone client read key according to the block length got from OM, which has already been implemented.

  3. 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

* Truncates an existing key.
*
* @param args the args of the key.
* @throws IOException
Copy link
Member

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

@maobaolong
Copy link
Member

@runzhiwang Thank you for your contribution, It's looks good overall, left a minor comments.

Copy link
Member

@captainzmc captainzmc left a 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")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
@SuppressWarnings("methodlength")


// update usedBytes atomically.
omVolumeArgs.getUsedBytes().add(-quotaReleased);
omBucketInfo.getUsedBytes().add(-quotaReleased);
Copy link
Member

@captainzmc captainzmc Nov 11, 2020

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
}
Copy link
Member

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

@adoroszlai
Copy link
Contributor

/pending

Copy link

@github-actions github-actions bot left a 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

@github-actions
Copy link

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."

@github-actions github-actions bot closed this Feb 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants