Skip to content

Fix ReaderPool.close() to close all Readers on failure - #137

Open
iamsanjaymalakar wants to merge 1 commit into
graphfoundation:1.0from
iamsanjaymalakar:fix-readerpool-close-all-readers
Open

Fix ReaderPool.close() to close all Readers on failure#137
iamsanjaymalakar wants to merge 1 commit into
graphfoundation:1.0from
iamsanjaymalakar:fix-readerpool-close-all-readers

Conversation

@iamsanjaymalakar

Copy link
Copy Markdown

Problem*
ReaderPool.close() closed pooled Readers sequentially. If one Reader.close() threw an IOException, the loop exited immediately and the remaining readers in the pool were never closed, leaking their underlying file handles.

Fix
Attempt to close all pooled readers, collect the first IOException and attach subsequent failures as suppressed exceptions, then throw after cleanup.

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.

1 participant