Uh oh!
There was an error while loading. Please reload this page.
[fix](topn) Handle empty rowid fetch RPC failures - #66443
Conversation
hello-stephen
commented
Aug 4, 2026
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
HappenLee
commented
Aug 4, 2026
/review |
There was a problem hiding this comment.
Automated review conclusion: changes requested.
The production logic appears correct: count_request_rows() == 0 is a sound no-data fence because request rows and merge ownership are populated together; callbacks complete before validation; non-empty transport failures and all backend PStatus errors remain fatal; successful servers retain one response block per relation; and continuing paths clear/reset reusable state.
One test checkpoint remains unresolved. The modified TestMergeMultiResponseStaleBlockMaps fixture cannot be produced by either a failed whole RPC or a successful server response, and no test exercises the newly added response.Clear() across consecutive batches. See the inline comment for the required reachable regression oracle.
Critical checkpoints:
- Goal and scope: the fix is focused and the production change meets the stated empty-RPC behavior.
- Concurrency and lifecycle: callback synchronization, controller resets, request clearing, response reuse, and stateful push/pull ordering are safe on every continuing path.
- Error handling: only zero-row transport failures are ignored; data-bearing transport failures and backend errors remain visible.
- Compatibility/configuration/persistence: no protocol, storage-format, configuration, or persistence change.
- Parallel paths and performance: the legacy fetch path has different ownership semantics and needs no matching change; no material performance regression found.
- Tests: validation branches are covered, but the core stale-response reuse boundary is not. Static review only; builds/tests were prohibited by the review instruction.
- User focus: no additional focus was provided; the whole PR was reviewed.
Review cycle status: complete after two rounds; all candidates were adjudicated and the single accepted issue is reported inline.
Uh oh!
There was an error while loading. Please reload this page.
yiguolei
commented
Aug 5, 2026
run buildall |
PR approved by at least one committer and no changes requested. |
HappenLee
commented
Aug 5, 2026
run buildall |
PR approved by anyone and no changes requested. |
### What problem does this PR solve? Issue Number: None Related PR: None Problem Summary: TopN lazy materialization sends reusable rowid-fetch RPC requests to every target backend. A backend request can contain no row IDs for a batch, but a transport failure for that no-op request previously aborted the query. If such a failure left no response blocks, response merging could also read a missing or stale response. Ignore transport failures only when the request has no rows, clear reused responses before dispatch, and skip deserialization for empty per-relation requests. Requests containing rows and all backend-reported errors still fail. ### Release note Fix TopN lazy materialization queries that fail when an empty rowid-fetch RPC encounters a transport error. ### Check List (For Author) - Test: Unit Test - ./run-be-ut.sh -j 48 --run --filter=MaterializationSharedStateTest.* - Behavior changed: Yes. Transport failures for rowid-fetch requests with no rows are ignored; requests with rows and backend-reported errors still fail. - Does this need documentation: No
b5e04d9 to
601685fCompareHappenLee
commented
Aug 5, 2026
run buildall |
Uh oh!
There was an error while loading. Please reload this page.
Problem Summary: TopN lazy materialization sends reusable rowid-fetch RPC requests to every target backend. A backend request can contain no row IDs for a batch, but a transport failure for that no-op request previously aborted the query. If such a failure left no response blocks, response merging could also read a missing or stale response. Ignore transport failures only when the request has no rows, clear reused responses before dispatch, and skip deserialization for empty per-relation requests. Requests containing rows and all backend-reported errors still fail. ### Release note Fix TopN lazy materialization queries that fail when an empty rowid-fetch RPC encounters a transport error.
Problem Summary: TopN lazy materialization sends reusable rowid-fetch RPC requests to every target backend. A backend request can contain no row IDs for a batch, but a transport failure for that no-op request previously aborted the query. If such a failure left no response blocks, response merging could also read a missing or stale response. Ignore transport failures only when the request has no rows, clear reused responses before dispatch, and skip deserialization for empty per-relation requests. Requests containing rows and all backend-reported errors still fail. ### Release note Fix TopN lazy materialization queries that fail when an empty rowid-fetch RPC encounters a transport error.
Problem Summary: TopN lazy materialization sends reusable rowid-fetch RPC requests to every target backend. A backend request can contain no row IDs for a batch, but a transport failure for that no-op request previously aborted the query. If such a failure left no response blocks, response merging could also read a missing or stale response. Ignore transport failures only when the request has no rows, clear reused responses before dispatch, and skip deserialization for empty per-relation requests. Requests containing rows and all backend-reported errors still fail. ### Release note Fix TopN lazy materialization queries that fail when an empty rowid-fetch RPC encounters a transport error.
Problem Summary: TopN lazy materialization sends reusable rowid-fetch RPC requests to every target backend. A backend request can contain no row IDs for a batch, but a transport failure for that no-op request previously aborted the query. If such a failure left no response blocks, response merging could also read a missing or stale response. Ignore transport failures only when the request has no rows, clear reused responses before dispatch, and skip deserialization for empty per-relation requests. Requests containing rows and all backend-reported errors still fail. ### Release note Fix TopN lazy materialization queries that fail when an empty rowid-fetch RPC encounters a transport error.
What problem does this PR solve?
Issue Number: None
Related PR: None
Problem Summary: TopN lazy materialization sends reusable rowid-fetch RPC requests to every target backend. A backend request can contain no row IDs for a batch, but a transport failure for that no-op request previously aborted the query. If such a failure left no response blocks, response merging could also read a missing or stale response. Ignore transport failures only when the request has no rows, clear reused responses before dispatch, and skip deserialization for empty per-relation requests. Requests containing rows and all backend-reported errors still fail.
Release note
Fix TopN lazy materialization queries that fail when an empty rowid-fetch RPC encounters a transport error.
Check List (For Author)