Mryange opened a new pull request, #69331:
URL: https://github.com/apache/doris/pull/69331
### What problem does this PR solve?
Issue Number: N/A
Related PR: #63436
Problem Summary:
Backport #63436 to branch-4.1. TopN lazy materialization can hang when a
join produces duplicate or out-of-order physical rowids. Root cause: reusing a
column iterator for these requests can underflow the RLE decoder's unsigned
skip count. Group rowids by segment, sort and deduplicate them before batch
reads, then scatter the results back to preserve request order and duplicate
rows.
The backport preserves branch-4.1 COW ownership, Variant V2 handling, rowid
range checks, file cache policy, and existing external row-fetch fixes. The
existing Variant segment-reader test is adapted to the batch interface. No
additional prerequisite PRs are included.
### Release note
Fix TopN lazy materialization hanging on duplicate or out-of-order rowids
from joins.
### Check List (For Author)
- Test:
- [ ] Regression test
- [ ] Unit Test
- [x] Manual test (add detailed scripts or steps below)
- BE ASAN clean build passed: `./build.sh --be --clean -j48`.
- clang-format 16 and `git diff --check` passed.
- Unit tests and SQL regression tests have not been run.
- Behavior changed:
- [ ] No.
- [x] Yes. Duplicate and out-of-order rowids are normalized before
storage reads; output order and duplicates are preserved.
- Does this need documentation?
- [x] No.
- [ ] Yes.
### Check List (For Reviewer who merge this PR)
- [ ] Confirm the release note
- [ ] Confirm test cases
- [ ] Confirm document
- [ ] Add branch pick label
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]