Conversation
ccat3z
marked this pull request as ready for review
September 9, 2026 12:27
ccat3z
force-pushed
the
rss-reader-endless-loop
branch
from
September 10, 2026 04:49
17ee6b4 to
46252b1
Compare
kecookier
reviewed
Sep 10, 2026
ccat3z
force-pushed
the
rss-reader-endless-loop
branch
from
September 10, 2026 11:38
46252b1 to
a66e4ab
Compare
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Fix the dangling timer reference and correct the negative-read assertion setup.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR fixes mid-page EOS and negative-read handling in the Velox RSS sort shuffle reader and adds regression coverage.
Changes:
- Honors
throwIfPastEndand rejects negative reads. - Adds EOS and invalid-read tests.
- Registers the new Velox test target.
File summaries
| File | Summary |
|---|---|
cpp/velox/tests/VeloxShuffleReaderTest.cc |
Adds regression tests. Critical (3 votes): fixes needed for the dangling deserializeTime reference. Moderate (1 vote): the negative-read assertion must wrap deserializer construction. |
cpp/velox/tests/CMakeLists.txt |
Registers the reader test executable. |
cpp/velox/shuffle/VeloxShuffleReader.cc |
Implements EOS and negative-read handling. |
Review details
Suppressed comments (1)
cpp/velox/tests/VeloxShuffleReaderTest.cc:210
- The negative
Read()is triggered byVeloxInputStream's constructor (next(false)), somakeDeserializer(...)throws beforeVELOX_ASSERT_THROWis entered. As written, this test aborts at the helper assignment instead of passing through the assertion; wrap themakeDeserializercall itself inVELOX_ASSERT_THROW(or otherwise defer the negative return untilnext()).
auto deserializer =
makeDeserializer(std::make_shared<FakeInputStream>(std::vector<uint8_t>{}, /*negativeRead=*/true));
- Files reviewed: 3/3 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
ccat3z
force-pushed
the
rss-reader-endless-loop
branch
from
September 14, 2026 07:17
66c8ba7 to
24e9682
Compare
Member
|
@ccat3z @kecookier it seems several Spark UT will hang there with this patch, please have a check |
…serializer GlutenByteInputStream::readBytes() drives next(true) in a for(;;) loop. When a page header declares more bytes than the stream actually holds (truncated partition data), the reader hits EOS mid-page — but VeloxInputStream::next() ignores its throwIfPastEnd argument and silently returns on EOS, so the loop never exits. This PR impl throwIfPassEnd arg of VeloxRssSortShuffleReaderDeserializer::VeloxInputStream::next()
ccat3z
force-pushed
the
rss-reader-endless-loop
branch
from
September 15, 2026 02:19
24e9682 to
e5c015f
Compare
Contributor
Author
The UT failures seems unrelated to this PR. Let me rebase onto the latest main and retrigger UT. |
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 are proposed in this pull request?
GlutenByteInputStream::readBytes()drivesnext(true)in afor(;;)loop. When a page header declares more bytes than the stream actually holds (truncated partition data), the reader hits EOS mid-page — butVeloxInputStream::next()ignores its throwIfPastEnd argument and silently returns on EOS, so the loop never exits.This PR impl throwIfPassEnd arg of VeloxRssSortShuffleReaderDeserializer::VeloxInputStream::next(), fixed bug1 in #12985
How was this patch tested?
UT
Was this patch authored or co-authored using generative AI tooling?
Co-Authored-By: Claude