Skip to content

workload/tpcc: fix --partition-affinity flag #39649

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

Merged
merged 3 commits into from
Aug 14, 2019

Conversation

nvanbenschoten
Copy link
Contributor

This was broken by b4e7796.

The second commit adds a new roachtest that uses the flag and would have caught this regression.

cc. @sploiselle

@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Contributor

@ajwerner ajwerner left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 1 files at r1, 1 of 1 files at r2.
Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @nvanbenschoten)


pkg/workload/tpcc/tpcc.go, line 570 at r2 (raw file):

		db := dbs[warehouse%len(dbs)]

		ql.WorkerFns = append(ql.WorkerFns, nil)

This seems like now this can race on accessing the underlying array of ql.WorkerFns. I don't think it's a particularly problematic hazard but when the slice re-allocs you might race with a goroutine constructing a new worker below.

This was broken by b4e7796.

Release note: None
This is required for all leaseholder preferences to work correctly when
we run the benchmark with more than three regions.

Release note: None
The commit also adds a new nightly roachtest that would have caught the
regression fixed in the previous roachtest.

Release note: None
@nvanbenschoten nvanbenschoten force-pushed the nvanbenschoten/fixTPCCGeo branch from ce26a55 to 415bf29 Compare August 14, 2019 17:13
Copy link
Contributor Author

@nvanbenschoten nvanbenschoten left a comment

Choose a reason for hiding this comment

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

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


pkg/workload/tpcc/tpcc.go, line 570 at r2 (raw file):

Previously, ajwerner wrote…

This seems like now this can race on accessing the underlying array of ql.WorkerFns. I don't think it's a particularly problematic hazard but when the slice re-allocs you might race with a goroutine constructing a new worker below.

Good point. Done.

Copy link
Contributor

@ajwerner ajwerner left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 2 of 2 files at r3, 1 of 1 files at r4, 1 of 1 files at r5.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained

@nvanbenschoten
Copy link
Contributor Author

bors r=ajwerner

craig bot pushed a commit that referenced this pull request Aug 14, 2019
39649: workload/tpcc: fix --partition-affinity flag r=ajwerner a=nvanbenschoten

This was broken by b4e7796.

The second commit adds a new roachtest that uses the flag and would have caught this regression.

cc. @sploiselle 

Co-authored-by: Nathan VanBenschoten <[email protected]>
@craig
Copy link
Contributor

craig bot commented Aug 14, 2019

Build succeeded

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.

3 participants