From 72122fbe1cf2c648a16b73aef5b7a06d6236b389 Mon Sep 17 00:00:00 2001 From: lx0 Date: Wed, 13 Oct 2021 20:17:06 +0800 Subject: [PATCH] fix get_multi_version_start bug --- src/storage/ob_table_store.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/storage/ob_table_store.cpp b/src/storage/ob_table_store.cpp index 4cc4332f2f..5226245022 100644 --- a/src/storage/ob_table_store.cpp +++ b/src/storage/ob_table_store.cpp @@ -3789,9 +3789,10 @@ int ObTableStore::get_multi_version_start(int64_t &multi_version_start) } } multi_version_start = tables_[idx]->get_multi_version_start(); - for (int64_t i = start_pos_; i < inc_pos_ - 1; ++i) { - if (tables_[i]->get_snapshot_version() >= tables_[idx]->get_base_version()) { + for (int64_t i = start_pos_; i < inc_pos_; ++i) { + if (tables_[i]->get_snapshot_version() >= tables_[inc_pos_]->get_base_version()) { multi_version_start = MAX(multi_version_start, tables_[i]->get_snapshot_version()); + break; } } } -- GitLab