release-25.2: colexecjoin: add missing cancellation checking to hash joiner#164889
Conversation
This commit adds the missing cancellation checking to the hash joiner: namely, previously it was possible to build the hash table (i.e. consume the right input) and then fully build the cross product of the batch from the left input before the cancellation was observed. If the right input was large, say 100k rows, then we'd have materialized about 100M rows before we'd observe the cancellation. This commit adds the cancel checking before every batch emitted by the hash joiner. Release note (bug fix): Previously, CockroachDB might not have promptly responded to the statement timeout when performing a hash join with ON filter that is mostly `false`. This is now fixed.
|
Thanks for opening a backport. Before merging, please confirm that it falls into one of the following categories (select one):
Add a brief release justification to the PR description explaining your selection. Also, confirm that the change does not break backward compatibility and complies with all aspects of the backport policy. All backports must be reviewed by the TL and EM for the owning area. |
|
It looks like your PR touches production code but doesn't add or edit any test code. Did you consider adding tests to your PR? 🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf. |
|
✅ PR #164889 is compliant with backport policy Confidence: high ❌ ENGREQ Check Failed: Please check one of the backport category checkboxes. 🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf. |
mw5h
left a comment
There was a problem hiding this comment.
@mw5h made 1 comment.
Reviewable status:complete! 1 of 0 LGTMs obtained (waiting on yuzefovich).
Backport 1/1 commits from #164879 on behalf of @yuzefovich.
This commit adds the missing cancellation checking to the hash joiner: namely, previously it was possible to build the hash table (i.e. consume the right input) and then fully build the cross product of the batch from the left input before the cancellation was observed. If the right input was large, say 100k rows, then we'd have materialized about 100M rows before we'd observe the cancellation. This commit adds the cancel checking before every batch emitted by the hash joiner.
Fixes: #163263.
Release note (bug fix): Previously, CockroachDB might not have promptly responded to the statement timeout when performing a hash join with ON filter that is mostly
false. This is now fixed.Release justification: stability fix - without it, a query might not be cancelable (without CRDB process restart) for a while.