diff --git a/lib/src/kvs/tikv/mod.rs b/lib/src/kvs/tikv/mod.rs index 6afa8387..7ea9a6da 100644 --- a/lib/src/kvs/tikv/mod.rs +++ b/lib/src/kvs/tikv/mod.rs @@ -33,7 +33,7 @@ impl Datastore { // Start a new transaction pub async fn transaction(&self, write: bool, lock: bool) -> Result { match lock { - true => { + false => { // Set the behaviour when dropping an unfinished transaction let opt = TransactionOptions::new_optimistic().drop_check(CheckLevel::Warn); // Create a new optimistic transaction @@ -46,7 +46,7 @@ impl Datastore { Err(e) => Err(Error::Tx(e.to_string())), } } - false => { + true => { // Set the behaviour when dropping an unfinished transaction let opt = TransactionOptions::new_pessimistic().drop_check(CheckLevel::Warn); // Create a new pessimistic transaction