HDDS-14370. RandomAccessFileChannel to implement Closeable#9905
Open
rich7420 wants to merge 6 commits intoapache:masterfrom
Open
HDDS-14370. RandomAccessFileChannel to implement Closeable#9905rich7420 wants to merge 6 commits intoapache:masterfrom
rich7420 wants to merge 6 commits intoapache:masterfrom
Conversation
Contributor
|
@Gargi-jais11 please take a look |
Gargi-jais11
approved these changes
Mar 11, 2026
Contributor
Gargi-jais11
left a comment
There was a problem hiding this comment.
Thanks @rich7420 for updating the patch. LGTM!
Contributor
Author
|
Thanks so much @adoroszlai , @yandrey321 and @Gargi-jais11 |
peterxcli
reviewed
Mar 12, 2026
| * {@link FileChannel#close()} is final (inherited), so we implement a minimal {@link FileChannel} | ||
| * and throw from {@link #implCloseChannel()} to simulate close failure. | ||
| */ | ||
| private static final class FailingCloseFileChannel extends FileChannel { |
Member
There was a problem hiding this comment.
could we find other to verify the close behaviour? there are so much code that are unused
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
The class already had a close() method but didn't implement Closeable, which could lead to resource leaks if developers miss calling close().
What is the link to the Apache JIRA
HDDS-14370
How was this patch tested?
https://github.com/rich7420/ozone/actions/runs/22942351747
reopen
#9628