forked from cockroachdb/cockroach
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Informs cockroachdb#22329. This commit adds support for Txn.Prepare in kvnemesis. Release note: None
- Loading branch information
1 parent
86ea407
commit 8b61574
Showing
12 changed files
with
171 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
echo | ||
---- | ||
db0.Txn(ctx, func(ctx context.Context, txn *kv.Txn) error { | ||
txn.SetIsoLevel(isolation.Snapshot) | ||
txn.Put(ctx, tk(5), sv(5)) // @<ts> <nil> | ||
txn.Prepare(ctx) | ||
return errors.New("rollback") | ||
}) // rollback |
8 changes: 8 additions & 0 deletions
8
pkg/kv/kvnemesis/testdata/TestApplier/txn-si-prepare-rollback
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
echo | ||
---- | ||
db0.Txn(ctx, func(ctx context.Context, txn *kv.Txn) error { | ||
txn.SetIsoLevel(isolation.Snapshot) | ||
txn.Put(ctx, tk(5), sv(5)) // @<ts> <nil> | ||
txn.Prepare(ctx) | ||
return errors.New("rollback") | ||
}) // rollback |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
echo | ||
---- | ||
db0.Txn(ctx, func(ctx context.Context, txn *kv.Txn) error { | ||
txn.SetIsoLevel(isolation.Serializable) | ||
txn.Put(ctx, tk(5), sv(5)) // @<ts> <nil> | ||
txn.Prepare(ctx) | ||
return errors.New("rollback") | ||
}) // rollback |
8 changes: 8 additions & 0 deletions
8
pkg/kv/kvnemesis/testdata/TestApplier/txn-ssi-prepare-rollback
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
echo | ||
---- | ||
db0.Txn(ctx, func(ctx context.Context, txn *kv.Txn) error { | ||
txn.SetIsoLevel(isolation.Serializable) | ||
txn.Put(ctx, tk(5), sv(5)) // @<ts> <nil> | ||
txn.Prepare(ctx) | ||
return errors.New("rollback") | ||
}) // rollback |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
echo | ||
---- | ||
···db0.Txn(ctx, func(ctx context.Context, txn *kv.Txn) error { | ||
··· txn.SetIsoLevel(isolation.ReadCommitted) | ||
··· txn.Get(ctx, tk(8)) | ||
··· txn.Prepare(ctx) | ||
··· return errors.New("rollback") | ||
···}) |