From: Xiubo Li Date: Mon, 23 Nov 2020 08:27:51 +0000 (+0800) Subject: common/config_proxy: clear the values.changed in _gather_changes() X-Git-Tag: v15.2.9~127^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=26369c39dff5a04d5918eec6586db68e828623dd;p=ceph.git common/config_proxy: clear the values.changed in _gather_changes() Signed-off-by: Xiubo Li (cherry picked from commit 7496be719c3419224ac7fc29d6db4e282b193554) --- diff --git a/src/common/config_proxy.h b/src/common/config_proxy.h index 9c0850fd08e1..7ca5a54af6a1 100644 --- a/src/common/config_proxy.h +++ b/src/common/config_proxy.h @@ -199,7 +199,6 @@ public: rev_obs_map_t rev_obs; if (config.finalize_reexpand_meta(values, obs_mgr)) { _gather_changes(values.changed, &rev_obs, nullptr); - values.changed.clear(); } call_observers(locker, rev_obs); @@ -256,7 +255,6 @@ public: if (!values.cluster.empty()) { // meta expands could have modified anything. Copy it all out again. _gather_changes(values.changed, &rev_obs, oss); - values.changed.clear(); } call_observers(locker, rev_obs); @@ -268,6 +266,7 @@ public: [this, rev_obs](md_config_obs_t *obs, const std::string &key) { map_observer_changes(obs, key, rev_obs); }, oss); + changes.clear(); } int set_val(const std::string_view key, const std::string& s, std::stringstream* err_ss=nullptr) { @@ -290,7 +289,6 @@ public: rev_obs_map_t rev_obs; _gather_changes(values.changed, &rev_obs, nullptr); - values.changed.clear(); call_observers(locker, rev_obs); return ret; @@ -301,7 +299,6 @@ public: rev_obs_map_t rev_obs; _gather_changes(values.changed, &rev_obs, oss); - values.changed.clear(); call_observers(locker, rev_obs); return ret;