Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

colflow: hash router output can leak disk resources when not fully exhausted #81490

Closed
yuzefovich opened this issue May 19, 2022 · 0 comments · Fixed by #81491
Closed

colflow: hash router output can leak disk resources when not fully exhausted #81490

yuzefovich opened this issue May 19, 2022 · 0 comments · Fixed by #81491
Assignees
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

Comments

@yuzefovich
Copy link
Member

yuzefovich commented May 19, 2022

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 to addBatch nor the output is canceled due to an error. The flow cleanup also doesn't save us because the router outputs are not added into ToClose slice. The bug has been present for several years.

Jira issue: CRDB-15161

@yuzefovich yuzefovich added the C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. label May 19, 2022
@yuzefovich yuzefovich self-assigned this May 19, 2022
@blathers-crl blathers-crl bot added the T-sql-queries SQL Queries Team label May 19, 2022
@craig craig bot closed this as completed in 73e7263 May 19, 2022
@mgartner mgartner moved this to Done in SQL Queries Jul 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants