HDFS-17893. Close block readers in DFSStripedInputStream on EC read exception#8348
HDFS-17893. Close block readers in DFSStripedInputStream on EC read exception#8348ZanderXu merged 9 commits intoapache:trunkfrom
Conversation
Replaced calls to dfsStripedInputStream.close() with calls to dfsStripedInputStream.closeCurrentBlockReaders() in StripeReader. Closing the input stream from the StripeReader causes issues with the retry functionality added in HDFS-17811. Closing the block readers may still help the issue identified in HDFS-17080.
|
💔 -1 overall
This message was automatically generated. |
|
I added a test that causes an NPE in DFSStripedInputStream.useDirectBuffer. On trunk, the test fails with the following in the log: The other 6 exceptions have the same stack trace. When this test is run on this branch it still fails, but in a different way which is probably handled better by a client because an IOException is expected exception. The failure in this branch looks like: |
|
💔 -1 overall
This message was automatically generated. |
|
💔 -1 overall
This message was automatically generated. |
|
💔 -1 overall
This message was automatically generated. |
|
🎊 +1 overall
This message was automatically generated. |
|
🎊 +1 overall
This message was automatically generated. |
|
@dlmarion Thanks for your report. @hfutatzhanghb Master, can you help review this PR. It seems that this bug is introduced by HDFS-17811, right? @dlmarion The |
@ZanderXu Got, Thanks for pointing that. Will review this PR quickly. |
|
Make sense to me. LGTM. |
It looks like the call to |
|
Merged. Thanks @dlmarion for your contribution and @hfutatzhanghb for your review. |
Description of PR
Replaced calls to dfsStripedInputStream.close() with calls to dfsStripedInputStream.closeCurrentBlockReaders() in StripeReader. Closing the input stream from the StripeReader causes issues with the retry functionality added in HDFS-17811. Closing the block readers may still help the issue identified in HDFS-17080.
I reduced the visibility of a couple of other methods that were not referenced anywhere else.
How was this patch tested?
Added a unit test that throws a NPE on trunk and throws an IOException in this branch.
For code changes:
LICENSE,LICENSE-binary,NOTICE-binaryfiles?AI Tooling
If an AI tool was used:
where is the name of the AI tool used.
https://www.apache.org/legal/generative-tooling.html