[Commits] 9fdb98e7e0f: Call end_ignore_snapshot_if_needed before rollback_stmt

Sergei Petrunia psergey at askmonty.org
Sat Jan 26 23:43:29 EET 2019


revision-id: 9fdb98e7e0f1784b6c7abfddd34114c77a584850 (fb-prod201801-196-g9fdb98e7e0f)
parent(s): 4509d1cb9b26e4ad77be96daf3bfab176d9ff1da
author: Sergei Petrunia
committer: Sergei Petrunia
timestamp: 2019-01-27 00:43:29 +0300
message:

Call end_ignore_snapshot_if_needed before rollback_stmt

We need to do that, because rollback_stmt operates on the snapshots, and
is not aware that some snapshot might have been stashed-away by
the "snapshot ignore mode".
This fixes rocksdb.rqg_transactions test.

---
 storage/rocksdb/ha_rocksdb.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/storage/rocksdb/ha_rocksdb.cc b/storage/rocksdb/ha_rocksdb.cc
index 78749c86aea..8871a43c048 100644
--- a/storage/rocksdb/ha_rocksdb.cc
+++ b/storage/rocksdb/ha_rocksdb.cc
@@ -3743,8 +3743,8 @@ static int rocksdb_rollback(handlerton *const hton, THD *const thd,
         - a statement inside a transaction is rolled back
       */
 
-      tx->rollback_stmt();
       tx->end_ignore_snapshot_if_needed();
+      tx->rollback_stmt();
       tx->set_tx_failed(true);
     }
 


More information about the commits mailing list