-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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: teach interleavedpartitioned about retryable transactions #30944
Conversation
Also some other speedups and cleanups while I was in there. Fixes cockroachdb#28567. Release note: None
I'll run this few a few roachtests tomorrow to ensure it does fix it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @BramGruneir!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: complete! 0 of 0 LGTMs obtained (and 1 stale)
pkg/workload/interleavedpartitioned/interleavedpartitioned.go, line 413 at r1 (raw file):
if opRand < w.insertPercent { start := timeutil.Now() insertStatement, err := db.Prepare(insertQuery)
Are these database-level prepared statements a speedup? @nvanbenschoten discovered recently that there is an internal mutex (in database/sql
) for database-level prepared statements that can become a contention point.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: complete! 1 of 0 LGTMs obtained
pkg/workload/interleavedpartitioned/interleavedpartitioned.go, line 413 at r1 (raw file):
Previously, petermattis (Peter Mattis) wrote…
Are these database-level prepared statements a speedup? @nvanbenschoten discovered recently that there is an internal mutex (in
database/sql
) for database-level prepared statements that can become a contention point.
I don't know if they're a speedup. The original goal of this workload was to emulate the customer's workload as closely as possible. So they do indeed prepare every statement. I'll do a run without them to see if they make a significant difference. But I'm going to merge this change first to get the test passing again.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TFTRs!
Reviewable status: complete! 1 of 0 LGTMs obtained
bors r+ |
30482: workload/kv: print the highest sequence number r=andreimatei a=andreimatei At the end of the kv workload, print the sequnence number of the highest row written so that it can be used in a next run: for example, you might want to prepopulate the db with --read_percent=0 and then perform only reads with --read_percent=100. If you don't pass --write-seq (or you don't know what to put in it), all the reads from --read_percent=100 would try to read a non-exitent row with sentinel sequence number 0. Release note: None 30882: workload: actually prepare writeStmt with Conn r=nvanbenschoten a=nvanbenschoten See #30811 (comment). Release note: None 30944: workload: teach interleavedpartitioned about retryable transactions r=BramGruneir a=BramGruneir Also some other speedups and cleanups while I was in there. Fixes #28567. Release note: None Co-authored-by: Andrei Matei <andrei@cockroachlabs.com> Co-authored-by: Nathan VanBenschoten <nvanbenschoten@gmail.com> Co-authored-by: Bram Gruneir <bram@cockroachlabs.com>
Build succeeded |
To answer your question as to if the prepare statements speed things up, in this case, they clearly do:
|
Ack. Thanks for checking. |
Also some other speedups and cleanups while I was in there.
Fixes #28567.
Release note: None