Skip to content

Propagates errors in Rfile.closeDeepCopies#5248

Merged
keith-turner merged 1 commit intoapache:mainfrom
keith-turner:close-deepcopies
Jan 16, 2025
Merged

Propagates errors in Rfile.closeDeepCopies#5248
keith-turner merged 1 commit intoapache:mainfrom
keith-turner:close-deepcopies

Conversation

@keith-turner
Copy link
Contributor

Rfile.closeLocalityGroupReaders() was suppressing IOExceptions. This method was called by Rfile.closeDeepCopies() which is called by FileManager.releaseReaders(). Suppressing the exception meant that releaseReaders() did not see the exception and would decided to return the rfile to the pool when it should not.

The only other code calling Rfile.closeLocalityGroupReaders() was Rfile.close(). Refactored the code so that Rfile.close() still suppressed the exception and Rfile.closeDeepCopies() does not suppress. Tried to preserve the behavior that Rfile.close() closes as many of its underlying resource as possible even if some exceptions occur.

Rfile.closeLocalityGroupReaders() was suppressing IOExceptions.
This method was called by Rfile.closeDeepCopies() which was called by
FileManager.releaseReaders().  Suppressing the exception meant that
releaseReaders() did not see the exception and would decided to return
the rfile to the pool when it should not.

The only other code calling Rfile.closeLocalityGroupReaders() was
Rfile.close(). Refactored the code so that Rfile.close() still suppressed
the exception and Rfile.closeDeepCopies() does not suppress.  Tried to
preserve the behavior that Rfile.close() closes as many of its
underlying resource as possible even if some exceptions occur.
@keith-turner keith-turner added this to the 2.1.4 milestone Jan 13, 2025
@dlmarion
Copy link
Contributor

Does this close #5245?

@keith-turner
Copy link
Contributor Author

Does this close #5245?

No, this was something that was observed while investigating #5245 though.

@keith-turner keith-turner merged commit 0cc90ef into apache:main Jan 16, 2025
@keith-turner keith-turner deleted the close-deepcopies branch January 16, 2025 22:58
keith-turner added a commit that referenced this pull request Jan 16, 2025
Rfile.closeLocalityGroupReaders() was suppressing IOExceptions.
This method was called by Rfile.closeDeepCopies() which was called by
FileManager.releaseReaders().  Suppressing the exception meant that
releaseReaders() did not see the exception and would decided to return
the rfile to the pool when it should not.

The only other code calling Rfile.closeLocalityGroupReaders() was
Rfile.close(). Refactored the code so that Rfile.close() still suppressed
the exception and Rfile.closeDeepCopies() does not suppress.  Tried to
preserve the behavior that Rfile.close() closes as many of its
underlying resource as possible even if some exceptions occur.
@keith-turner
Copy link
Contributor Author

locally I had made these changes against a branch based off 2.1. When creating the PR I forgotr to change the target branch. The same changes apply cleanly in main and 2.1 so I did not notice. I cherry picked the changes back to 2.1 in 22831aa

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants