diff options
author | Spencer T Brody <spencer@mongodb.com> | 2016-05-17 18:48:16 -0400 |
---|---|---|
committer | Spencer T Brody <spencer@mongodb.com> | 2016-05-19 16:37:15 -0400 |
commit | f6ee1ecb1d25a3a89144676c9d73007c877157b8 (patch) | |
tree | bd7669706649bc6bb6d76efdf3ae0d575c4ad274 /src/mongo/s/grid.h | |
parent | aa9fc690ceef10bdbadb433f28fe57aded7e80ba (diff) | |
download | mongo-f6ee1ecb1d25a3a89144676c9d73007c877157b8.tar.gz |
SERVER-23973 Ensure config servers send the correct config server optime when talking to shards
Diffstat (limited to 'src/mongo/s/grid.h')
-rw-r--r-- | src/mongo/s/grid.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/mongo/s/grid.h b/src/mongo/s/grid.h index 4316bca0f0d..02d5798d80d 100644 --- a/src/mongo/s/grid.h +++ b/src/mongo/s/grid.h @@ -122,8 +122,18 @@ public: return _balancerConfig.get(); } + /** + * Returns the the last optime that a shard or config server has reported as the current + * committed optime on the config server. + * NOTE: This is not valid to call on a config server instance. + */ repl::OpTime configOpTime() const; + /** + * Called whenever a mongos or shard gets a response from a config server or shard and updates + * what we've seen as the last config server optime. + * NOTE: This is not valid to call on a config server instance. + */ void advanceConfigOpTime(repl::OpTime opTime); /** @@ -156,6 +166,7 @@ private: mutable stdx::mutex _mutex; // Last known highest opTime from the config server that should be used when doing reads. + // This value is updated any time a shard or mongos talks to a config server or a shard. repl::OpTime _configOpTime; // Deprecated. This is only used on mongos, and once addShard is solely handled by the configs, |