[feature] keep the order of GlobalLearnerList

This commit is contained in:
BinChenn 2024-11-26 13:14:54 +00:00 committed by ob-robot
parent 0ef98b1b8e
commit 2ca21225d6
2 changed files with 2 additions and 2 deletions

View File

@ -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 <algorithm>
namespace oceanbase
{

View File

@ -146,7 +146,8 @@ int BaseLearnerList<MAX_SIZE, T>::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;
}