Use async commit and one-phase commit where possible in TiKV (#4701)
This commit is contained in:
parent
a94d356017
commit
66d904215b
1 changed files with 4 additions and 0 deletions
|
@ -84,6 +84,10 @@ impl Datastore {
|
|||
} else {
|
||||
TransactionOptions::new_optimistic()
|
||||
};
|
||||
// Use async commit to determine transaction state earlier
|
||||
opt = opt.use_async_commit();
|
||||
// Try to use one-phase commit if writing to only one region
|
||||
opt = opt.try_one_pc();
|
||||
// Set the behaviour when dropping an unfinished transaction
|
||||
opt = opt.drop_check(CheckLevel::Warn);
|
||||
// Set this transaction as read only if possible
|
||||
|
|
Loading…
Reference in a new issue