[feature] keep the order of GlobalLearnerList
This commit is contained in:
parent
0ef98b1b8e
commit
2ca21225d6
1
deps/oblib/src/common/ob_learner_list.h
vendored
1
deps/oblib/src/common/ob_learner_list.h
vendored
@ -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
|
||||
{
|
||||
|
3
deps/oblib/src/common/ob_learner_list.ipp
vendored
3
deps/oblib/src/common/ob_learner_list.ipp
vendored
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user