From 3f9f43eba5a68cc8af3c461af3cc4332010b9b7a Mon Sep 17 00:00:00 2001 From: wangyunlai Date: Mon, 7 Aug 2023 13:35:40 +0800 Subject: [PATCH] Docker build error (#221) ### What problem were solved in this pull request? Issue Number: ref #205 Problem: build failed on docker container ### What is changed and how it works? fix compile error ### Other information --- src/observer/storage/trx/mvcc_trx.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/observer/storage/trx/mvcc_trx.cpp b/src/observer/storage/trx/mvcc_trx.cpp index 031a4d0..4488dcc 100644 --- a/src/observer/storage/trx/mvcc_trx.cpp +++ b/src/observer/storage/trx/mvcc_trx.cpp @@ -85,7 +85,12 @@ Trx *MvccTrxKit::create_trx(int32_t trx_id) void MvccTrxKit::destroy_trx(Trx *trx) { lock_.lock(); - erase(trxes_, trx); + for (auto iter = trxes_.begin(), itend = trxes_.end(); iter != itend; ++iter) { + if (*iter == trx) { + trxes_.erase(iter); + break; + } + } lock_.unlock(); delete trx; -- GitLab