perf(query-orchestrator): reuse SQL tuples for full partitions - #11866
Conversation
|
Claude finished @ovr's task in 3m 10s —— View job Approach is sound and safe — 1 medium (untested branch), 2 low. No correctness bug found.Full review
VerdictThe change is correct and the aliasing is safe. I traced every consumer of both fields and none mutates the tuple or its params array:
Because A nice incidental effect: Findings1. Medium — the new branch has no test coverage (inline) The PR body claims existing partition-expansion tests cover the affected behaviour. They cover only the aliased side. 2. Low —
3. Low — the comment states the wrong load-bearing fact (inline) "Reuse the tuple to avoid duplicate allocations" narrates the diff, which the commit message already does. The fact worth pinning down is that the two fields are now often the same mutable tuple, so consumers must not mutate params — On #11860Correctly scoped as Not verifiedI could not run |
|
Claude finished @ovr's task in 1m 24s —— View job Both prior findings addressed — no new issues. Approve-equivalent; nothing blocking.Full review (re-review of `11e1ac3`)
What changed since the last round
Both of my threads are resolved. The new test does reach the branchTraced it rather than trusting the name:
The Aliasing safety (unchanged from last round, re-confirmed)
On #11860 (unchanged)Still correctly scoped as Not verified
|
|
Claude finished @ovr's task in 1m 1s —— View job Only the comment changed since the last round — 1 low (comment wording). Nothing blocking.Full review (re-review of `087a4a1`)
What changed
- // Full partitions use the same SQL and parameters for loading and structure versioning.
- // Reuse the tuple to avoid duplicate allocations; a clipped load range needs its own parameters.
+ // Reuse the SQL tuple for unclipped partitions to reduce computation and memory allocations.Two lines → one. The condition is still Findings1. Low — the new wording restates the code instead of the invariant (inline)
Re-confirmed from the prior round
On #11860 (unchanged)Correctly scoped as Not verified
|
Codecov Report✅ All modified and coverable lines are covered by tests.
Additional details and impacted files@@ Coverage Diff @@
## master #11866 +/- ##
===========================================
- Coverage 80.35% 60.25% -20.10%
===========================================
Files 500 239 -261
Lines 106555 19180 -87375
Branches 3881 3882 +1
===========================================
- Hits 85618 11557 -74061
+ Misses 20387 7074 -13313
+ Partials 550 549 -1
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:
|
|
Claude finished @ovr's task in 1m 7s —— View job
|
Description of Changes Made
Reuse the SQL tuple for
structureVersionLoadSqlandloadSqlwhen a partition's full and load ranges match, avoiding duplicate SQL wrappers, parameter arrays, timestamp conversions, and options objects while preserving separate tuples for clipped partitions.In an isolated 133,920-description benchmark (five runs per variant), median retained heap growth after GC fell from 248.7 to 189.7 MiB and expansion time from 1,322 to 1,008 ms (both about 24%).
Related to #11860; this reduces allocation and retention costs but does not fix the unbounded range cache.
Validation: oxlint and 96 standalone equivalence cases passed, along with nine partition-expansion Jest tests, including new UTC/New York cases asserting shared tuples for full partitions and distinct tuples and end parameters for clipped partitions, using transpilation without type checking because the default run was blocked by local
cubestore-drivertype errors.Check List