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

colexec: fix resetting of the hashtable with distinct build mode #50247

Merged
merged 1 commit into from
Jun 16, 2020

Conversation

yuzefovich
Copy link
Member

Some time ago we introduced "distinct" build mode to the hash table
which is used by the unordered distinct. In that addition we forgot to
add one thing to be reset whenever the hash table is reset which causes
partially ordered distinct to behave incorrectly. The damage, however,
is negligible because the bug doesn't affect "default" build mode nor
unordered distinct as is, only when we have partially ordered distinct
which uses the unordered distinct internally and resets it between
different "chunks". And we don't currently plan partially ordered
distinct, so only our unit tests are able to hit it, and there is no
need for a backport.

Fixes: #50006.

Release note: None

@yuzefovich yuzefovich requested review from asubiotto and a team June 15, 2020 22:31
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@yuzefovich
Copy link
Member Author

Thanks to the change of random batch size distribution, I was able to easily reproduce the second failure from #50006 which made debugging the issue a lot easier.

Some time ago we introduced "distinct" build mode to the hash table
which is used by the unordered distinct. In that addition we forgot to
add one thing to be reset whenever the hash table is reset which causes
partially ordered distinct to behave incorrectly. The damage, however,
is negligible because the bug doesn't affect "default" build mode nor
unordered distinct as is, only when we have partially ordered distinct
which uses the unordered distinct internally and resets it between
different "chunks". And we don't currently plan partially ordered
distinct, so only our unit tests are able to hit it, and there is no
need for a backport.

Release note: None
Copy link
Contributor

@asubiotto asubiotto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @asubiotto)

@yuzefovich
Copy link
Member Author

TFTR!

bors r+

@craig
Copy link
Contributor

craig bot commented Jun 16, 2020

Build succeeded

@craig craig bot merged commit b3069bd into cockroachdb:master Jun 16, 2020
@yuzefovich yuzefovich deleted the hashtable-reset branch June 16, 2020 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

sql/colexec: TestDistinct failed
3 participants