From 2187223b39c7824d9edc33cccbe84c577081cd81 Mon Sep 17 00:00:00 2001 From: Mark Benvenuto Date: Tue, 1 May 2018 13:37:31 -0400 Subject: SERVER-34228 Free Monitoring Replica Set support --- src/mongo/db/free_mon/free_mon_processor.h | 31 ++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'src/mongo/db/free_mon/free_mon_processor.h') diff --git a/src/mongo/db/free_mon/free_mon_processor.h b/src/mongo/db/free_mon/free_mon_processor.h index ade74fc09e6..64734d3a981 100644 --- a/src/mongo/db/free_mon/free_mon_processor.h +++ b/src/mongo/db/free_mon/free_mon_processor.h @@ -375,6 +375,34 @@ private: void doAsyncMetricsFail( Client* client, const FreeMonMessageWithPayload* msg); + /** + * Process a change to become a replica set primary + */ + void doOnTransitionToPrimary(Client* client); + + /** + * Process a notification that storage has received insert or update. + */ + void doNotifyOnUpsert(Client* client, + const FreeMonMessageWithPayload* msg); + + /** + * Process a notification that storage has received delete or drop collection. + */ + void doNotifyOnDelete(Client* client); + + + /** + * Process a notification that storage has rolled back. + */ + void doNotifyOnRollback(Client* client); + + /** + * Process a in-memory state transition of state. + */ + void processInMemoryStateChange(const FreeMonStorageState& originalState, + const FreeMonStorageState& newState); + private: // Collection of collectors to send on registration FreeMonCollectorCollection& _registration; @@ -412,6 +440,9 @@ private: // Last read storage state boost::optional _lastReadState; + // When we change to primary, do we register? + bool _registerOnTransitionToPrimary{false}; + // Pending update to disk FreeMonStorageState _state; -- cgit v1.2.1