-
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
Added high-content benchmarks and fixed starvation bugs #5257
Added high-content benchmarks and fixed starvation bugs #5257
Conversation
@tschottdorf should look at the Review status: 0 of 7 files reviewed at latest revision, 2 unresolved discussions. sql/bank_test.go, line 65 [r1] (raw file): sql/bank_test.go, line 69 [r1] (raw file): Comments from the review on Reviewable.io |
Reviewed 7 of 7 files at r1. sql/bank_test.go, line 89 [r1] (raw file): storage/replica.go, line 1514 [r1] (raw file): storage/replica_command.go, line 325 [r1] (raw file): storage/replica_test.go, line 2859 [r1] (raw file): storage/replica_test.go, line 2881 [r1] (raw file): Comments from the review on Reviewable.io |
Reviewed 7 of 7 files at r1. sql/bank_test.go, line 28 [r1] (raw file): storage/replica.go, line 1510 [r1] (raw file): storage/replica_command.go, line 325 [r1] (raw file): storage/replica_test.go, line 2826 [r1] (raw file): storage/replica_test.go, line 2859 [r1] (raw file): Comments from the review on Reviewable.io |
Review status: all files reviewed at latest revision, 8 unresolved discussions. sql/bank_test.go, line 65 [r1] (raw file): sql/bank_test.go, line 69 [r1] (raw file): sql/bank_test.go, line 89 [r1] (raw file): storage/replica.go, line 1510 [r1] (raw file): storage/replica_command.go, line 325 [r1] (raw file): Comments from the review on Reviewable.io |
0d26695
to
72bc578
Compare
Reviewed 3 of 3 files at r2. sql/bank_test.go, line 65 [r1] (raw file): storage/replica_test.go, line 1668 [r2] (raw file): Comments from the review on Reviewable.io |
Review status: all files reviewed at latest revision, 8 unresolved discussions, some commit checks failed. sql/bank_test.go, line 65 [r1] (raw file): sql/bank_test.go, line 69 [r1] (raw file): Comments from the review on Reviewable.io |
Review status: all files reviewed at latest revision, 9 unresolved discussions, some commit checks failed. storage/replica_command.go, line 325 [r1] (raw file): h.Txn = h.Txn.Clone()
h.Txn.Update(&txn)
reply.Txn = h.Txn // rest of the batch should use the new txn storage/replica_test.go, line 1666 [r2] (raw file): storage/replica_test.go, line 2871 [r2] (raw file): Comments from the review on Reviewable.io |
Reviewed 3 of 3 files at r2. storage/replica_command.go, line 325 [r2] (raw file): Comments from the review on Reviewable.io |
Review status: all files reviewed at latest revision, 9 unresolved discussions, some commit checks failed. sql/bank_test.go, line 69 [r1] (raw file): storage/replica_test.go, line 1666 [r2] (raw file): storage/replica_test.go, line 1668 [r2] (raw file): storage/replica_test.go, line 2871 [r2] (raw file): Comments from the review on Reviewable.io |
72bc578
to
e6d0a16
Compare
Reviewed 3 of 3 files at r3. storage/replica_test.go, line 2929 [r3] (raw file): storage/replica_test.go, line 2930 [r3] (raw file): Comments from the review on Reviewable.io |
Review status: all files reviewed at latest revision, 9 unresolved discussions. Comments from the review on Reviewable.io |
Reviewed 3 of 3 files at r3. Comments from the review on Reviewable.io |
Review status: all files reviewed at latest revision, 8 unresolved discussions, all commit checks successful. storage/replica_test.go, line 2930 [r3] (raw file): Comments from the review on Reviewable.io |
The bank benchmark was never doing anything before now as there was no money in any of the accounts, so nothing would transfer. Added high-contention workloads to the benchmarks and in the process discovered starvation scenarios and an outright bug. The starvation scenario was encountered when a batch containing writes and an end transaction failed due to a serialized txn having `Timestamp` != `OrigTimestamp`. In that event, we discard the entire batch engine, meaning the intents for the writes are discarded with everything else. This change commits the results of a batch which fails with EndTransaction. There was also a bug when restarting a transaction. The replay of the `BeginTransaction` statement was incorrectly using the value of the transaction record instead of the transaction passed in with the batch request. In the event that the txn was pushed or aborted during the restart, this would cause various problems when commit time comes. The 2, 4, and 8 account benchmarks are pretty slow, but optimizing those is the next step.
e6d0a16
to
21701f3
Compare
…ion-benchmark Added high-content benchmarks and fixed starvation bugs
Reviewed 1 of 1 files at r4. Comments from the review on Reviewable.io |
The bank benchmark was never doing anything before now as there
was no money in any of the accounts, so nothing would transfer.
Added high-contention workloads to the benchmarks and in the
process discovered starvation scenarios and an outright bug.
The starvation scenario was encountered when a batch containing
writes and an end transaction failed due to a serialized txn
having
Timestamp
!=OrigTimestamp
. In that event, we discardthe entire batch engine, meaning the intents for the writes are
discarded with everything else.
This change commits the results of a batch which fails with
EndTransaction.
There was also a bug when restarting a transaction. The replay
of the
BeginTransaction
statement was incorrectly using thevalue of the transaction record instead of the transaction
passed in with the batch request. In the event that the txn
was pushed or aborted during the restart, this would cause
various problems when commit time comes.
The 2, 4, and 8 account benchmarks are pretty slow, but
optimizing those is the next step.
This change is