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
evalExpression: partial vector leak in constant-folding Dup() loop #24059
In pkg/sql/colexec/evalExpression.go:1393-1407, the GetExprZoneMap() function duplicates vectors in a loop for constant-folding. If any Dup() or GetReadonlyResultFromNoColumnExpression() call fails mid-loop, previously duplicated vectors are leaked — no cleanup path exists.
Leak scenario: If Dup() fails on iteration i=2, then ivecs[0] and ivecs[1] (already successfully duplicated) are never freed. The ivecs slice goes out of scope without cleanup.
Impact
Memory leak proportional to the number of successfully duplicated vectors before failure
Each leaked vector holds mpool-allocated memory that is never returned
Affects zone map computation during query optimization
More likely under memory pressure (when Dup allocations are more prone to failure)
Activity
fix: 4 CN memory leak/growth issues
fix: 4 CN memory leak/growth issues
fix: CN memory leak/growth issues — 4 fixes with tests
fix: CN memory leak/growth issues — 4 fixes with tests
fix: CN memory leak/growth issues — 4 fixes with tests
fix: 4 CN memory leak/growth issues (#24058 #24059 #24060 #24061) (#2…
fix: 4 CN memory leak/growth issues (matrixorigin#24058 matrixorigin#…