diff options
author | Mark Benvenuto <mark.benvenuto@mongodb.com> | 2018-05-01 13:37:31 -0400 |
---|---|---|
committer | Mark Benvenuto <mark.benvenuto@mongodb.com> | 2018-05-01 13:37:31 -0400 |
commit | 2187223b39c7824d9edc33cccbe84c577081cd81 (patch) | |
tree | fbb8f06dbc9256bdca1507c1db00e4473f769b32 /src/mongo/db/free_mon/free_mon_processor.h | |
parent | 404b3532261866aec6a05a8e4fb7e35c212986d5 (diff) | |
download | mongo-2187223b39c7824d9edc33cccbe84c577081cd81.tar.gz |
SERVER-34228 Free Monitoring Replica Set support
Diffstat (limited to 'src/mongo/db/free_mon/free_mon_processor.h')
-rw-r--r-- | src/mongo/db/free_mon/free_mon_processor.h | 31 |
1 files changed, 31 insertions, 0 deletions
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<FreeMonMessageType::AsyncMetricsFail>* 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<FreeMonMessageType::NotifyOnUpsert>* 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<FreeMonStorageState> _lastReadState; + // When we change to primary, do we register? + bool _registerOnTransitionToPrimary{false}; + // Pending update to disk FreeMonStorageState _state; |