Repository navigation
fix: align expression memory with hash build budget - #26455
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? |
XuPeng-SH
left a comment
There was a problem hiding this comment.
Deep-reviewed current head 5c5280b.
The previous P1 is resolved: array result bounds are now derived from the element width, including BF16/F16, and the max-width regressions verify that retained expression memory stays within the admitted reservation. I also checked constructor admission, high-water/replacement overlap, error cleanup, spill/re-spill ownership, Reset/Free generation boundaries, and the three join variants. No further blocking issues found.
Validation: all six affected packages pass normal tests and race tests; all 26 directly relevant tests pass individually with -race -count=100; go build and go vet pass; CI is green.
Merge Queue Status
This pull request spent 40 minutes 26 seconds in the queue, including 40 minutes 9 seconds running CI. Required conditions to merge
|
Expression executors retain reusable vector capacity across batches and resets. The previous HashBuild accounting replaced expression reservations independently from that physical lifetime, which could either undercount retained memory or double-charge reused capacity. This PR: - introduces an explicit per-root expression memory lease tied to one HashBuild budget generation; - admits constant executor allocations before construction and reconciles them to retained capacity; - reserves only uncovered allocate-copy-free overlap when an executor grows, while retaining the admitted high-water mark; - accounts for IFF/CASE/COALESCE selected-result and selected-parameter scratch; - applies the same ownership model to initial spill, probe scatter, recursive re-spill, HashJoin, DedupJoin, and RightDedupJoin; - releases failed builder executors before replacement re-spill admission; - adds retained-versus-borrowed ownership accounting and lifecycle regression coverage. Design boundary: this lease covers expressions participating in the shared HashBuild/spill working set. Resident probe expressions remain under normal process/mpool accounting; this is not a general query-memory budget. Validation: - related six packages pass normal and race test suites; - all 21 new or directly modified behavioral tests pass race stress with count=100; - go build and go vet pass for all owning packages; - hashbuild package coverage: 81.4%; - final independent review converged with no findings. Approved by: @XuPeng-SH
Expression executors retain reusable vector capacity across batches and resets. The previous HashBuild accounting replaced expression reservations independently from that physical lifetime, which could either undercount retained memory or double-charge reused capacity. This PR: - introduces an explicit per-root expression memory lease tied to one HashBuild budget generation; - admits constant executor allocations before construction and reconciles them to retained capacity; - reserves only uncovered allocate-copy-free overlap when an executor grows, while retaining the admitted high-water mark; - accounts for IFF/CASE/COALESCE selected-result and selected-parameter scratch; - applies the same ownership model to initial spill, probe scatter, recursive re-spill, HashJoin, DedupJoin, and RightDedupJoin; - releases failed builder executors before replacement re-spill admission; - adds retained-versus-borrowed ownership accounting and lifecycle regression coverage. Design boundary: this lease covers expressions participating in the shared HashBuild/spill working set. Resident probe expressions remain under normal process/mpool accounting; this is not a general query-memory budget. Validation: - related six packages pass normal and race test suites; - all 21 new or directly modified behavioral tests pass race stress with count=100; - go build and go vet pass for all owning packages; - hashbuild package coverage: 81.4%; - final independent review converged with no findings. Approved by: @XuPeng-SH
Expression executors retain reusable vector capacity across batches and resets. The previous HashBuild accounting replaced expression reservations independently from that physical lifetime, which could either undercount retained memory or double-charge reused capacity. This PR: - introduces an explicit per-root expression memory lease tied to one HashBuild budget generation; - admits constant executor allocations before construction and reconciles them to retained capacity; - reserves only uncovered allocate-copy-free overlap when an executor grows, while retaining the admitted high-water mark; - accounts for IFF/CASE/COALESCE selected-result and selected-parameter scratch; - applies the same ownership model to initial spill, probe scatter, recursive re-spill, HashJoin, DedupJoin, and RightDedupJoin; - releases failed builder executors before replacement re-spill admission; - adds retained-versus-borrowed ownership accounting and lifecycle regression coverage. Design boundary: this lease covers expressions participating in the shared HashBuild/spill working set. Resident probe expressions remain under normal process/mpool accounting; this is not a general query-memory budget. Validation: - related six packages pass normal and race test suites; - all 21 new or directly modified behavioral tests pass race stress with count=100; - go build and go vet pass for all owning packages; - hashbuild package coverage: 81.4%; - final independent review converged with no findings. Approved by: @XuPeng-SH
What type of PR is this?
Which issue(s) this PR fixes:
Fixes #26433
What this PR does / why we need it:
Expression executors retain reusable vector capacity across batches and resets. The previous HashBuild accounting replaced expression reservations independently from that physical lifetime, which could either undercount retained memory or double-charge reused capacity.
This PR:
Design boundary: this lease covers expressions participating in the shared HashBuild/spill working set. Resident probe expressions remain under normal process/mpool accounting; this is not a general query-memory budget.
Validation: