You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Design]: align ExpressionExecutor retained capacity with HashBuild budget lifetime #26433
Follow-up from #26408 and #26412. #26412 closes spill-payload ownership and several concrete cleanup leaks, but expression executors can retain reusable vectors/capacity outside the lifetime currently represented by HashBuild memory reservations.
Problem
Budget accounting must describe memory that remains physically retained, not only the logical rows or batches currently being processed. If an ExpressionExecutor keeps vector capacity across calls, resets, or execution generations while the corresponding HashBuild reservation is released or recomputed independently, admission can undercount memory and later growth can exceed the intended query envelope.
The inverse error is also possible: charging retained capacity twice after reuse can reject work unnecessarily.
Proposed direction
Give retained executor buffers an explicit owner and generation.
Couple reservation acquisition, resize, reuse, reset, and release to the actual retained capacity lifetime.
Define transfer rules when executor results/vectors are borrowed or moved into another operator.
Expose retained versus active bytes in diagnostics without double counting shared memory.
Activity