From 2ca21225d66d33be6ecf2bf6ca0e3d7119b198bc Mon Sep 17 00:00:00 2001 From: BinChenn Date: Tue, 26 Nov 2024 13:14:54 +0000 Subject: [PATCH] [feature] keep the order of GlobalLearnerList --- deps/oblib/src/common/ob_learner_list.h | 1 - deps/oblib/src/common/ob_learner_list.ipp | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/deps/oblib/src/common/ob_learner_list.h b/deps/oblib/src/common/ob_learner_list.h index f3b51bdf4..a6da83d5b 100644 --- a/deps/oblib/src/common/ob_learner_list.h +++ b/deps/oblib/src/common/ob_learner_list.h @@ -18,7 +18,6 @@ #include "lib/string/ob_sql_string.h" // ObSqlString #include "lib/utility/ob_unify_serialize.h" // serialize #include "common/ob_member.h" -#include namespace oceanbase { diff --git a/deps/oblib/src/common/ob_learner_list.ipp b/deps/oblib/src/common/ob_learner_list.ipp index cfb156e3d..b30a444d3 100644 --- a/deps/oblib/src/common/ob_learner_list.ipp +++ b/deps/oblib/src/common/ob_learner_list.ipp @@ -146,7 +146,8 @@ int BaseLearnerList::add_learner(const T &learner) } else if (OB_FAIL(learner_array_.push_back(learner))) { COMMON_LOG(ERROR, "learner_array_ push back failed", K(ret), K(learner)); } else { - lib::ob_sort(learner_array_.begin(), learner_array_.end(), [](const T &a, const T &b){ return a < b;}); + // For replication and migration of columnar replicas, + // learner_list should keep the order of learners as they had been added into. } return ret; }