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

workload: fix non-uniqueness error in movr workload setup #45035

Merged
merged 1 commit into from
Feb 14, 2020

Conversation

rohany
Copy link
Contributor

@rohany rohany commented Feb 12, 2020

Fixes #44864.

The generator for the promo codes table relied on a random
word generator for the string primary key of the table.
At a large enough row count this was nearly gauranteed
to have a collision. This PR fixes it by prepending
a unique rowid to each random promo code.

Release note (cli change): This PR fixes a potential error
occurring when loading the movr dataset with a large number
of rows in the promo codes column.

@rohany rohany requested a review from danhhz February 12, 2020 21:15
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Contributor

@danhhz danhhz left a comment

Choose a reason for hiding this comment

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

LGTM

Fixes cockroachdb#44864.

The generator for the promo codes table relied on a random
word generator for the string primary key of the table.
At a large enough row count this was nearly gauranteed
to have a collision. This PR fixes it by prepending
a unique rowid to each random promo code.

Release note (cli change): This PR fixes a potential error
occurring when loading the movr dataset with a large number
of rows in the promo codes column.
@rohany
Copy link
Contributor Author

rohany commented Feb 13, 2020

bors r+

@craig
Copy link
Contributor

craig bot commented Feb 13, 2020

Build failed

@rohany
Copy link
Contributor Author

rohany commented Feb 13, 2020

trying bors again, not sure what went wrong.

bors r+

@craig
Copy link
Contributor

craig bot commented Feb 13, 2020

Build failed

@rohany
Copy link
Contributor Author

rohany commented Feb 13, 2020

bors r+

@craig
Copy link
Contributor

craig bot commented Feb 13, 2020

Build failed

@rohany
Copy link
Contributor Author

rohany commented Feb 14, 2020

That was definitely a flake

bors r+

craig bot pushed a commit that referenced this pull request Feb 14, 2020
45035: workload: fix non-uniqueness error in movr workload setup r=rohany a=rohany

Fixes #44864.

The generator for the promo codes table relied on a random
word generator for the string primary key of the table.
At a large enough row count this was nearly gauranteed
to have a collision. This PR fixes it by prepending
a unique rowid to each random promo code.

Release note (cli change): This PR fixes a potential error
occurring when loading the movr dataset with a large number
of rows in the promo codes column.

Co-authored-by: Rohan Yadav <rohany@alumni.cmu.edu>
@craig
Copy link
Contributor

craig bot commented Feb 14, 2020

Build succeeded

@craig craig bot merged commit 15e859b into cockroachdb:master Feb 14, 2020
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.

cli: cockroach demo movr fails to start with duplicate key violation when generating data set
3 participants