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

changefeedccl: avoid undefined behavior in distribution test #120649

Merged
merged 1 commit into from
Mar 18, 2024

Conversation

jayshrivastava
Copy link
Contributor

The rangeDistributionTester would sometimes calculate log(0) when determining the node to move a range too. Most of the time, this would be some garbage value which gets ignored. Sometimes, this may return a valid node id, causing the range distribution to be wrong and failing the test failures. This change updates the tester to handle this edge case.

Closes: #120470
Release note: None

@jayshrivastava jayshrivastava marked this pull request as ready for review March 18, 2024 15:37
@jayshrivastava jayshrivastava requested a review from a team as a code owner March 18, 2024 15:37
@jayshrivastava jayshrivastava requested review from rharding6373 and removed request for a team March 18, 2024 15:37
@cockroach-teamcity
Copy link
Member

This change is Reviewable

The `rangeDistributionTester` would sometimes calculate log(0) when
determining the node to move a range too. Most of the time,
this would be some garbage value which gets ignored. Sometimes,
this may return a valid node id, causing the range distribution to be
wrong and failing the test failures. This change updates the tester
to handle this edge case.

Closes: cockroachdb#120470
Release note: None
Copy link
Contributor

@wenyihu6 wenyihu6 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 @rharding6373)

@jayshrivastava
Copy link
Contributor Author

TYFR!

@jayshrivastava
Copy link
Contributor Author

bors r=wenyihu6

@craig
Copy link
Contributor

craig bot commented Mar 18, 2024

@craig craig bot merged commit 4deb9e3 into cockroachdb:master Mar 18, 2024
20 of 22 checks passed
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.

ccl/changefeedccl: TestChangefeedWithNoDistributionStrategy failed
3 participants