From 5b039c45147d455373e88bb2e820b37eb87e997c Mon Sep 17 00:00:00 2001 From: obdev Date: Mon, 6 Feb 2023 13:06:37 +0800 Subject: [PATCH] [Election] fix election priority memory leak --- .../election_priority_impl/election_priority_impl.h | 4 ++-- src/logservice/palf/election/algorithm/election_impl.h | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/logservice/leader_coordinator/election_priority_impl/election_priority_impl.h b/src/logservice/leader_coordinator/election_priority_impl/election_priority_impl.h index 57e8da22d8..60efde73f3 100644 --- a/src/logservice/leader_coordinator/election_priority_impl/election_priority_impl.h +++ b/src/logservice/leader_coordinator/election_priority_impl/election_priority_impl.h @@ -132,9 +132,9 @@ private: bool is_observer_stopped_;// kill -15 bool is_server_stopped_; bool is_zone_stopped_; - common::ObSArray fatal_failures_;// negative infos + common::ObSEArray fatal_failures_;// negative infos bool is_primary_region_; - common::ObSArray serious_failures_;// negative infos + common::ObSEArray serious_failures_;// negative infos share::SCN scn_; bool is_in_blacklist_; common::ObStringHolder in_blacklist_reason_; diff --git a/src/logservice/palf/election/algorithm/election_impl.h b/src/logservice/palf/election/algorithm/election_impl.h index 62bd57ec05..7de7487f09 100644 --- a/src/logservice/palf/election/algorithm/election_impl.h +++ b/src/logservice/palf/election/algorithm/election_impl.h @@ -239,6 +239,8 @@ private:// 定向暴露给友元类 } LOG_PHASE(TRACE, phase, "compare priority done"); } + lhs_priority->~ElectionPriority(); + rhs_priority->~ElectionPriority(); } } } -- GitLab