-
Notifications
You must be signed in to change notification settings - Fork 593
HDDS-14417. Skip wrapping allocated but unused blocks for empty file as pseudo file and save in deletedTable #9639
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
base: master
Are you sure you want to change the base?
Conversation
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.
Pull request overview
This PR addresses issue HDDS-14417 by skipping the creation of pseudo files for allocated but unused blocks when committing empty files. The change prevents unnecessary entries in the deleted table for files with zero data size.
Changes:
- Modified the
wrapUncommittedBlocksAsPseudoKey()method to return null when the file's data size is 0, even if there are uncommitted blocks - Added test coverage for empty file scenarios in both regular key commit and S3 multipart upload commit operations
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/key/OMKeyRequest.java | Added condition to skip wrapping uncommitted blocks when data size is 0 |
| hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/request/key/TestOMKeyCommitRequest.java | Added test for empty file with pre-allocated uncommitted blocks |
| hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/request/s3/multipart/TestS3MultipartUploadCommitPartRequest.java | Added test for empty multipart upload part with uncommitted blocks |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Thanks for the patch. LGTM +1.
Could you help update the PR descriptions?
priyeshkaratha
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.
Thanks @ChenSammi for working on this. Changes LGTM
ashishkumar50
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.
@ChenSammi Thanks for the fix, LGTM.
7e3a482 to
19c638f
Compare
…as pseudo file and save in deletedTable
What changes were proposed in this pull request?
Skip wrapping allocated but unused blocks for empty file as pseudo file and save in deletedTable
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-14417
How was this patch tested?
New unit tests.