From: Samuel Just Date: Tue, 19 Sep 2023 22:05:07 +0000 (-0700) Subject: PeeringState: introduce optional on_replica_activate notification X-Git-Tag: v19.0.0~6^2~6 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=61a1a2a526c3fcd937e11a7e32f1e53e4fdf12bc;p=ceph.git PeeringState: introduce optional on_replica_activate notification The OSD will use it to activate the scrubber in replica mode. Signed-off-by: Samuel Just --- diff --git a/src/osd/PeeringState.cc b/src/osd/PeeringState.cc index 2c41b7b71189..c81cb958a7a9 100644 --- a/src/osd/PeeringState.cc +++ b/src/osd/PeeringState.cc @@ -2967,6 +2967,8 @@ void PeeringState::activate( state_set(PG_STATE_ACTIVATING); pl->on_activate(std::move(to_trim)); + } else { + pl->on_replica_activate(); } if (acting_set_writeable()) { PGLog::LogEntryHandlerRef rollbacker{pl->get_log_handler(t)}; diff --git a/src/osd/PeeringState.h b/src/osd/PeeringState.h index b9f8401b05b6..89ef702e0fea 100644 --- a/src/osd/PeeringState.h +++ b/src/osd/PeeringState.h @@ -389,6 +389,7 @@ public: virtual void on_role_change() = 0; virtual void on_change(ObjectStore::Transaction &t) = 0; virtual void on_activate(interval_set to_trim) = 0; + virtual void on_replica_activate() {} virtual void on_activate_complete() = 0; virtual void on_new_interval() = 0; virtual Context *on_clean() = 0;