summaryrefslogtreecommitdiff
path: root/src/mongo/db/free_mon/free_mon_processor.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/free_mon/free_mon_processor.h')
-rw-r--r--src/mongo/db/free_mon/free_mon_processor.h24
1 files changed, 24 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 cfaf1b504ad..f16a810f5b7 100644
--- a/src/mongo/db/free_mon/free_mon_processor.h
+++ b/src/mongo/db/free_mon/free_mon_processor.h
@@ -272,6 +272,27 @@ private:
size_t _count;
};
+/**
+ * In-memory registration status
+ *
+ * Ensures primaries and secondaries register separately
+ */
+enum class FreeMonRegistrationStatus {
+ /**
+ * Free monitoring is not enabled - default state.
+ */
+ kDisabled,
+
+ /**
+ * Registration in progress.
+ */
+ kPending,
+
+ /**
+ * Free Monitoring is enabled.
+ */
+ kEnabled,
+};
/**
* Process in an Agent in a Agent/Message Passing model.
@@ -479,6 +500,9 @@ private:
// Pending update to disk
boost::synchronized_value<FreeMonStorageState> _state;
+ // In-memory registration status
+ FreeMonRegistrationStatus _registrationStatus{FreeMonRegistrationStatus::kDisabled};
+
// Countdown launch to support manual cranking
FreeMonCountdownLatch _countdown;