@@ -162,7 +162,7 @@ class YcsbLeanStore : public YcsbExecutor {
162162 utils::RandomGenerator::RandString (val, FLAGS_ycsb_val_size);
163163
164164 if (bench_transaction_kv_) {
165- cr::TxManager::My ().StartTx ();
165+ CoroEnv::CurTxMgr ().StartTx ();
166166 }
167167
168168 auto op_code =
@@ -172,7 +172,7 @@ class YcsbLeanStore : public YcsbExecutor {
172172 }
173173
174174 if (bench_transaction_kv_) {
175- cr::TxManager::My ().CommitTx ();
175+ CoroEnv::CurTxMgr ().CommitTx ();
176176 }
177177 }
178178 };
@@ -252,10 +252,10 @@ class YcsbLeanStore : public YcsbExecutor {
252252 // generate key for read
253253 GenYcsbKey (zipf_random, key);
254254 if (bench_transaction_kv_) {
255- cr::TxManager::My ().StartTx (TxMode::kShortRunning ,
255+ CoroEnv::CurTxMgr ().StartTx (TxMode::kShortRunning ,
256256 IsolationLevel::kSnapshotIsolation , true );
257257 table->Lookup (Slice (key, FLAGS_ycsb_key_size), copy_value);
258- cr::TxManager::My ().CommitTx ();
258+ CoroEnv::CurTxMgr ().CommitTx ();
259259 } else {
260260 table->Lookup (Slice (key, FLAGS_ycsb_key_size), copy_value);
261261 }
@@ -264,10 +264,10 @@ class YcsbLeanStore : public YcsbExecutor {
264264 GenYcsbKey (zipf_random, key);
265265 // generate val for update
266266 if (bench_transaction_kv_) {
267- cr::TxManager::My ().StartTx ();
267+ CoroEnv::CurTxMgr ().StartTx ();
268268 table->UpdatePartial (Slice (key, FLAGS_ycsb_key_size), update_call_back,
269269 *update_desc);
270- cr::TxManager::My ().CommitTx ();
270+ CoroEnv::CurTxMgr ().CommitTx ();
271271 } else {
272272 table->UpdatePartial (Slice (key, FLAGS_ycsb_key_size), update_call_back,
273273 *update_desc);
0 commit comments