Repository navigation
branch-4.2: [improvement](fe) Default external scans to bounded split batches (#69683) #69991
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
994205e
[improvement](fe) Default external scans to bounded split batches
924060929 0cae86d
[fix](fe) Preserve exact scan metadata for admission and explain
924060929 abcbb5c
[fix](fe) Complete bounded external split delivery and consumer cleanup
924060929 b76e398
[fix](fe) Keep Hive split estimates independent of partition batches
924060929 58ebd37
[test](fe) Move split-close RPC fixture outside the race timeout
924060929 4294427
[fix](fe) Preserve Hive sampling and retry split-source cleanup
924060929 442f8a3
[test](regression) Use exact planning for the Iceberg Variant fixture…
924060929 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[P1] Keep source-close cleanup retryable until FE acknowledges it.
_close_requestedis set before_fetch_batch(), so a transient transport/FE failure leaves the source registered when the request did not reach FE, while all later close calls return immediately. On a large scan this can refill that backend's bounded queue and stall split delivery to other backends after a local LIMIT; the non-OK close status also cancels the query. Set the latch only after success or retain a bounded retry/best-effort cleanup path, and avoid turning a transient cleanup failure into the scan's close status.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 4294427. A separate close mutex serializes cleanup without waiting for the consuming-fetch lock, and the completed flag is set only after acknowledgement. Close performs a bounded retry, using the standard ThriftRpcHelper reconnect/retry path only for this idempotent request; ordinary consuming fetches are not retried. FE already returns OK when the source was removed, so a lost reply is safe. Exhausted cleanup errors deliberately still propagate to query cancellation: silently ignoring them could strand the finite queue and block other BEs. A later close remains retryable after failure. Tests cover loss before FE execution, a lost reply after execution, bounded transport/FE failures and recovery; all 63 focused BE ASAN tests, 236 related FE tests and full BE ASAN/FE packaging pass locally. This is a focused BE test target, not the complete BE UT suite.