kv: expose isolation level through kv.Txn API#100900
kv: expose isolation level through kv.Txn API#100900craig[bot] merged 1 commit intocockroachdb:masterfrom
Conversation
b3a576c to
d6a530e
Compare
arulajmani
left a comment
There was a problem hiding this comment.
Reviewed 5 of 5 files at r1, 16 of 16 files at r2, 6 of 6 files at r3, all commit messages.
Reviewable status:complete! 1 of 0 LGTMs obtained (waiting on @DrewKimball and @nvanbenschoten)
pkg/kv/kvclient/kvcoord/txn_coord_sender_test.go line 74 at r3 (raw file):
// TestTxnCoordSenderAssignsTxnKey verifies that a transaction is assigned a // transaction record key corresponding to the first key it writes.
Do you think it's worth extending this test to check for locking reads as well? Doesn't have to be in this patch.
Fixes cockroachdb#100130. This commit exposes isolation levels through the kv.Txn API with the introduction of a new `SetIsoLevel` method. This method behaves similarly to `SetUserPriority`. Notably, the isolation must be set before any operations are performed on the transaction. Release note: None
d6a530e to
2e83183
Compare
nvb
left a comment
There was a problem hiding this comment.
TFTR!
bors r=arulajmani
Reviewable status:
complete! 0 of 0 LGTMs obtained (and 1 stale) (waiting on @arulajmani and @DrewKimball)
pkg/kv/kvclient/kvcoord/txn_coord_sender_test.go line 74 at r3 (raw file):
Previously, arulajmani (Arul Ajmani) wrote…
Do you think it's worth extending this test to check for locking reads as well? Doesn't have to be in this patch.
TestTxnHeartbeaterLoopStartedOnFirstLock is a better test that sits alongside TestTxnHeartbeaterSetsTransactionKey and exercises that case, so I don't think we need anything more here. This test here is already of limited utility. I'm reviving it mostly because it gives coverage of a setting and getting a few txn attributes.
|
Build failed: |
|
Bors flaked on a timeout in bors r+ |
|
Build succeeded: |
Fixes #100130.
This commit exposes isolation levels through the kv.Txn API with the introduction of a new
SetIsoLevelmethod. This method behaves similarly toSetUserPriority. Notably, the isolation must be set before any operations are performed on the transaction.Release note: None