Skip to content

Commit

Permalink
colbuilder: enforce unique memory monitor names
Browse files Browse the repository at this point in the history
Our disk-spilling infrastructure (namely, `diskSpillerBase`) uses the
name of the limited memory monitor of its in-memory operator in order to
distinguish the "memory budget exceeded" errors between the ones it
needs to catch and the ones it needs to propagate further. In
particular, previously it was possible that the in-memory chains within
two disk-backed sorters created for the external distinct (one in the
fallback strategy and another when the output ordering is needed, on top
of the external distinct) would have the same memory monitor names. This
is now fixed by appending a unique suffix to all names and is enforced
via an invariants assertion in the test setup.

Note that even with the previous behavior no actual bug would occur
because the monitors with the same name were on "different levels of the
tree" and there was the correct catcher in-between. So this commit
simply restores the assumption that we had implicitly without fixing any
production bugs.

Release note: None
  • Loading branch information
yuzefovich committed Apr 9, 2021
1 parent fa8f5db commit 7d8097a
Show file tree
Hide file tree
Showing 4 changed files with 119 additions and 82 deletions.
Loading

0 comments on commit 7d8097a

Please sign in to comment.