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: freeze the hashing algorithm #103808

Merged
merged 2 commits into from
May 25, 2023

Conversation

HonoreDB
Copy link
Contributor

In almost every place where we need consistent hashing, we specify it. But in the Kafka sink, we just used Sarama's default, which is subject to change. This PR specifies the algorithm explicitly there too, and adds a test with hardcoded values so that future updates can't cause inconsistent behavior in a running changefeed.

Fixes #101779

HonoreDB added 2 commits May 23, 2023 14:56
The following commit will freeze the partitioning logic in its current
state. This commit ensures that that change, as well as future library
updates, don't accidentally change the hashing logic. For example, Sarama
intends to change how it handles negative values in a future update.

Release note: None
This is a no-op change meant to defend against future changes
in the default Sarama hashing algorithm.

Fixes cockroachdb#101779.

Release note: None
@HonoreDB HonoreDB requested a review from a team as a code owner May 23, 2023 20:32
@HonoreDB HonoreDB requested review from miretskiy and removed request for a team May 23, 2023 20:32
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@HonoreDB
Copy link
Contributor Author

bors r=[miretskiy]

@craig
Copy link
Contributor

craig bot commented May 25, 2023

Build succeeded:

@craig craig bot merged commit 0ab47ef into cockroachdb:master May 25, 2023
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.

changefeedccl: freeze kafka (&pubsub?) partition hashing algorithm
3 participants