[Commits] a196a4dd4: PessimisticTransaction::CommitBatch should lock the keys

Sergei Petrunia psergey at askmonty.org
Mon Apr 8 15:21:54 EEST 2019


revision-id: a196a4dd46d018a4815467e979fda46126ca5fa9 (v5.8-1031-ga196a4dd4)
parent(s): 09018ffe081f913be6c1580335d5476ba6c1b0a9
author: Sergei Petrunia
committer: Sergei Petrunia
timestamp: 2019-04-08 15:21:54 +0300
message:

PessimisticTransaction::CommitBatch should lock the keys

Regardless of whether the lock manager needs key tracking or not.

---
 utilities/transactions/pessimistic_transaction.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/utilities/transactions/pessimistic_transaction.cc b/utilities/transactions/pessimistic_transaction.cc
index 7ca6ab981..ca6bc27b6 100644
--- a/utilities/transactions/pessimistic_transaction.cc
+++ b/utilities/transactions/pessimistic_transaction.cc
@@ -133,7 +133,7 @@ WriteCommittedTxn::WriteCommittedTxn(TransactionDB* txn_db,
 Status PessimisticTransaction::CommitBatch(WriteBatch* batch) {
   TransactionKeyMap keys_to_unlock;
 
-  Status s = do_key_tracking_? LockBatch(batch, &keys_to_unlock): Status::OK();
+  Status s = LockBatch(batch, &keys_to_unlock);
 
   if (!s.ok()) {
     return s;


More information about the commits mailing list