Repository navigation
Conversation
This was referenced Sep 30, 2026
xiangfu0
force-pushed
the
xiangfu0/codex1/sorted-exchange-ordering
branch
from
September 30, 2026 15:54
5dc4fb3 to
697a710
Compare
xiangfu0
force-pushed
the
xiangfu0/codex1/sorted-exchange-auto
branch
from
September 30, 2026 15:54
56bca01 to
d70e922
Compare
xiangfu0
marked this pull request as ready for review
September 30, 2026 16:01
xiangfu0
force-pushed
the
xiangfu0/codex1/sorted-exchange-ordering
branch
from
September 30, 2026 19:06
697a710 to
986291e
Compare
xiangfu0
force-pushed
the
xiangfu0/codex1/sorted-exchange-auto
branch
2 times, most recently
from
October 3, 2026 19:45
5c407f2 to
c131cde
Compare
xiangfu0
force-pushed
the
xiangfu0/codex1/sorted-exchange-ordering
branch
from
October 3, 2026 19:45
986291e to
8e86cc7
Compare
Preserve the boolean option and planner builder. Only allocate a tuning session for auto; the default keeps receiver sorting.
Drop short-stream samples on terminal blocks, errors, close and cancellation while preserving output and stats.
Use a distinct enum import and the existing assertion import so both independent follow-ups merge cleanly.
Keep only the AUTO entry points used by planning and broker observations. Apply receiver observations only to existing cache entries, preserving generation and probe checks.
Use stable logical exchange identities and per-query stage bindings for AUTO evidence. Lower explicit sender Sort and k-way exchanges for warm decisions, preserve unbounded cold window input and fail-closed cluster capability, and port the plain transport merge contract with regression coverage.
Align the shared full-input window regression name and comments, and the RexBuilder mock setup order, with the corrected ordering dependency. Preserve the identical test bodies and all AUTO coverage.
xiangfu0
force-pushed
the
xiangfu0/codex1/sorted-exchange-auto
branch
from
October 3, 2026 20:25
c131cde to
b43d2c8
Compare
xiangfu0
force-pushed
the
xiangfu0/codex1/sorted-exchange-ordering
branch
from
October 3, 2026 20:25
8e86cc7 to
755721f
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## xiangfu0/codex1/sorted-exchange-ordering #19714 +/- ##
===========================================================================
Coverage ? 68.26%
Complexity ? 1450
===========================================================================
Files ? 3529
Lines ? 229576
Branches ? 36479
===========================================================================
Hits ? 156723
Misses ? 60504
Partials ? 12349
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
Author
|
CI follow-up at All 14 current-head checks passed: unit/integration, compatibility, quickstart, Java 11 client, linter and Trivy (checks). Maintainer review remains pending. |
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.
Build opt-in adaptive sorting for global ordered windows on #19711 using the logical sorted-input contract. AUTO chooses on the finalized logical tree before stage allocation: warm evidence produces an unbounded sender Sort and an explicit k-way merge exchange; cold, negative or incomplete evidence produces a plain exchange followed by an unbounded receiver Sort. The cold path now retains complete window input beyond the broker response limit, including following frames and RANGE peers.
Persistent decisions use query identity plus deterministic logical exchange paths and input/collation fingerprints; per-query bindings map those identities to allocated receiver stages only for observations. The existing four-sender/400k-row heuristic, bounded cache, TTL, probe ownership and cooldown remain. Explicit true/false never train AUTO, and missing, unknown, mixed, unreadable or SNAPSHOT versions and multi-cluster queries fail closed. Cold profiling retains compatible protobuf field 8 and bounded per-stream sampling; warm plans use the distinct merge-receive node with plain mailbox transport.
Try
SET useMultistageEngine=true; SET windowSortOnSender='auto'; SELECT SUM(v) OVER (ORDER BY ts) FROM myTable;.Validation: 718 unique planner, runtime and broker cases pass on the canonical source represented by restacked head
b43d2c8b43with warnings/deprecation enabled on JDK 25; scoped formatting/license/checkstyle checks pass, with zero compiler warnings on added lines. The shared test cleanup freshly reran 123 cases; remaining unchanged-source evidence is reused after exact tree verification, and all seven module checks ran on the final restacked head. A reproducible local 4×100k-row operator comparison checks complete row parity across random, sorted, reverse and tie-heavy inputs, including sender-sort cost; concurrent host load and broad confidence intervals limit timing inference. The controlled local whole-query benchmark below is complete; full hosted CI for the final remote head and reviewer approval remain merge gates. This source port does not close #19395's unbounded read-ahead issue.Final dependency head is
755721f7fd1548f3e94f81c86f4f64cfae4c66c8; existing stack base names remain unchanged. The release-version capability gate is a cached point-in-time check and does not atomically prevent a concurrent downgrade.The inherited fixture followup independently passes all 593 ResourceBasedQueryPlansTest cases on this exact source tree with compiler warnings/deprecations enabled, zero failures/errors/skips and all four planner formatting/license/style goals passing. Its native feature patch is byte-identical to the preceding published stack; only core owns the 124 corrected window-input fetch expectations. These local results do not establish hosted CI status.
The existing stack base is retained. Full unit/integration PR workflows are filtered to master; no complete hosted CI result exists for this child at its current stack base. After the prerequisite PRs land, the agreed base update and exact-head CI are still required. No merge, automatic merge, CI suppression or master integration was performed.
Controlled whole-query AUTO validation
Three fresh JVMs executed 576 queries and checked all 230,400,000 returned rows against exact LONG-schema/payload oracles on this head. Four real query servers each read one immutable 100k-row segment. Real QueryEnvironment planning, QueryDispatcher/QueryRunner execution and mailbox transport exercised AUTO cold profiling, warm sender selection, periodic receiver reprobes, following frames beyond the response limit and RANGE peers spanning all four senders. Each of 16 tie keys had 25,000 global peers. All three runs exited normally; an independent review checked every plan/statistics tree, recomputed distributions and verified cleanup.
Random warm sender-selected AUTO medians were 144.91 ms versus OFF 269.56 ms for following, and 175.21 ms versus 321.47 ms for RANGE. These summarize only the 27 warm sender-selected samples per frame, excluding AUTO cold/probe requests. Reverse/tie receiver AUTO medians were about 12–16% higher than OFF in this experiment. Fixed workload order, shared CPU/heap, JIT/cache/GC and host load limit inference; these data establish neither production speedups nor absence of regressions.
The fixture uses public supported-capability test configuration and in-memory routing registration on one host, with three loopback gRPC mailbox senders and one in-memory sender. It excludes broker HTTP/auth, Helix/ZK/controller, live version discovery, mixed-version/concurrent-upgrade qualification, failure coverage and arbitrary BIG_DECIMAL/null workloads. The production SNAPSHOT fail-closed gate and all source files remain unchanged. All owned JVMs, 27 endpoints and generated temporary segment directories were cleaned up. Production qualification and exact-head hosted stack CI remain separate gates.