diff --git a/core/src/kvs/tikv/mod.rs b/core/src/kvs/tikv/mod.rs index 913d52ee..a54bea3c 100644 --- a/core/src/kvs/tikv/mod.rs +++ b/core/src/kvs/tikv/mod.rs @@ -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