Repository navigation
fix(hashbuild): avoid false budget admission rejection - #26318
mergify[bot] merged 3 commits into
Conversation
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
df50955 to
689aa22
Compare
689aa22 to
b0f7844
Compare
XuPeng-SH
left a comment
There was a problem hiding this comment.
Deep re-review complete. The previous partial-tail blocker is fixed at 82d84f2: admission now follows the exact per-vector mpool.GrowCapacity replacement sequence, preserves earlier retained deltas, and covers remainder allocation. The deterministic 2 x 4096-row / 1 KiB varchar regression now passes. I also re-audited reservation ownership, spill reader/writer cleanup, recursive scatter source charging, and bounded serialization/reuse peaks. Full affected packages pass under -race on the exact head and after a clean merge with current main; all 17 new boundary tests pass with -race -count=50; go vet and diff check pass. No remaining blocker.
Merge Queue Status
This pull request spent 35 minutes 15 seconds in the queue, including 35 minutes running CI. Required conditions to merge
|
…26318) HashBuild budget accounting used whole-payload multipliers that double-counted memory already covered by retained batches and auxiliary reservations. Wide LOAD DATA input could therefore be rejected even though one decoded/runtime-filter payload fit the hard query budget. This PR: - replaces duplicated whole-payload multipliers with one payload plus explicit allocator, metadata, and framing slack; - accounts transient old/new allocation overlap when reusable vectors, spill arrays, unique keys, and marshal buffers grow; - reuses the existing spill high-water lease and grows only the uncovered transient difference, preventing duplicate admission rejection; - falls back to releasing the old reader batch before decoding when a reuse peak cannot be admitted; - adds tight-budget, large/small batch, spill replacement, cleanup, and corrupted-record regression coverage. Validation: - hashbuild and spillutil package tests - hashbuild and spillutil package tests with race detector - focused transient-overlap tests with race detector repeated 100 times - go vet for both packages - independent blocker reviews converged with no remaining correctness blocker Approved by: @XuPeng-SH
…26318) HashBuild budget accounting used whole-payload multipliers that double-counted memory already covered by retained batches and auxiliary reservations. Wide LOAD DATA input could therefore be rejected even though one decoded/runtime-filter payload fit the hard query budget. This PR: - replaces duplicated whole-payload multipliers with one payload plus explicit allocator, metadata, and framing slack; - accounts transient old/new allocation overlap when reusable vectors, spill arrays, unique keys, and marshal buffers grow; - reuses the existing spill high-water lease and grows only the uncovered transient difference, preventing duplicate admission rejection; - falls back to releasing the old reader batch before decoding when a reuse peak cannot be admitted; - adds tight-budget, large/small batch, spill replacement, cleanup, and corrupted-record regression coverage. Validation: - hashbuild and spillutil package tests - hashbuild and spillutil package tests with race detector - focused transient-overlap tests with race detector repeated 100 times - go vet for both packages - independent blocker reviews converged with no remaining correctness blocker Approved by: @XuPeng-SH
…26318) HashBuild budget accounting used whole-payload multipliers that double-counted memory already covered by retained batches and auxiliary reservations. Wide LOAD DATA input could therefore be rejected even though one decoded/runtime-filter payload fit the hard query budget. This PR: - replaces duplicated whole-payload multipliers with one payload plus explicit allocator, metadata, and framing slack; - accounts transient old/new allocation overlap when reusable vectors, spill arrays, unique keys, and marshal buffers grow; - reuses the existing spill high-water lease and grows only the uncovered transient difference, preventing duplicate admission rejection; - falls back to releasing the old reader batch before decoding when a reuse peak cannot be admitted; - adds tight-budget, large/small batch, spill replacement, cleanup, and corrupted-record regression coverage. Validation: - hashbuild and spillutil package tests - hashbuild and spillutil package tests with race detector - focused transient-overlap tests with race detector repeated 100 times - go vet for both packages - independent blocker reviews converged with no remaining correctness blocker Approved by: @XuPeng-SH
What type of PR is this?
Which issue(s) this PR fixes:
issue #26192
What this PR does / why we need it:
HashBuild budget accounting used whole-payload multipliers that double-counted memory already covered by retained batches and auxiliary reservations. Wide LOAD DATA input could therefore be rejected even though one decoded/runtime-filter payload fit the hard query budget.
This PR:
Validation: