colflow: hash router output can leak disk resources when not fully exhausted #81490
Labels
C-bug
Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.
T-sql-queries
SQL Queries Team
Currently, it is possible that the disk-backed spilling queue used by hash router outputs is not closed when the hash router exits. Namely, this can occur if the router output is not fully exhausted (i.e. it can still produce more batches), but the consumer of the router output is satisfied and calls
DrainMeta
. In such a scenario,routerOutput.closeLocked
is never called because a zero-length batch is never given toaddBatch
nor the output is canceled due to an error. The flow cleanup also doesn't save us because the router outputs are not added intoToClose
slice. The bug has been present for several years.Jira issue: CRDB-15161
The text was updated successfully, but these errors were encountered: