diff options
author | Pavi Vetriselvan <pvselvan@umich.edu> | 2020-05-28 13:00:09 -0400 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-06-26 00:45:47 +0000 |
commit | b281adecd42a0d638d31acbf36a7affc5c0db3f9 (patch) | |
tree | 01a0feb4c08297a6563a942caeab8f7f12eef909 /src/mongo/db/repl/replication_coordinator_impl.h | |
parent | 341fb5d34695cb7d0994f5d91947355d60dabf36 (diff) | |
download | mongo-b281adecd42a0d638d31acbf36a7affc5c0db3f9.tar.gz |
SERVER-46962 Blacklist sync sources that are shutting down
Diffstat (limited to 'src/mongo/db/repl/replication_coordinator_impl.h')
-rw-r--r-- | src/mongo/db/repl/replication_coordinator_impl.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/mongo/db/repl/replication_coordinator_impl.h b/src/mongo/db/repl/replication_coordinator_impl.h index 6c39ff5d294..e21f7f8a434 100644 --- a/src/mongo/db/repl/replication_coordinator_impl.h +++ b/src/mongo/db/repl/replication_coordinator_impl.h @@ -106,7 +106,7 @@ public: virtual void enterTerminalShutdown() override; - virtual bool enterQuiesceModeIfSecondary() override; + virtual bool enterQuiesceModeIfSecondary(Milliseconds quiesceTime) override; virtual bool inQuiesceMode() const override; @@ -1180,6 +1180,11 @@ private: StatusWith<int> myIndex); /** + * Calculates the time (in millis) left in quiesce mode and converts the value to int64. + */ + long long _calculateRemainingQuiesceTimeMillis() const; + + /** * Fills an IsMasterResponse with the appropriate replication related fields. horizonString * should be passed in if hasValidConfig is true. */ @@ -1651,6 +1656,9 @@ private: // If we're in quiesce mode. If true, we'll respond to isMaster requests with ok:0. bool _inQuiesceMode = false; // (M) + // The deadline until which quiesce mode will last. + Date_t _quiesceDeadline; // (M) + // The cached value of the 'counter' field in the server's TopologyVersion. AtomicWord<int64_t> _cachedTopologyVersionCounter; // (S) }; |