diff options
author | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2015-08-17 13:43:31 -0400 |
---|---|---|
committer | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2015-08-17 17:18:37 -0400 |
commit | 5be3721da7af1fc5258e9f1753e51324cdd83092 (patch) | |
tree | 43c404d2f323dcabce352a18b3a3b72f1a4eda0f /src/mongo/s/mock_ns_targeter.h | |
parent | b4f7738e808361c3edc0c040d8eb560b7f6f1526 (diff) | |
download | mongo-5be3721da7af1fc5258e9f1753e51324cdd83092.tar.gz |
SERVER-19855 Include min OpTime with shard version
This change adds the OpTime of the chunk manager as of the time its cached
metadata was loaded along with each versioned request sent from MongoS.
This includes write commands and the setShardVersion command.
The OpTime is only sent as part of this change. There will be a follow-up
change to add code to interpret this information on the MongoD side.
Diffstat (limited to 'src/mongo/s/mock_ns_targeter.h')
-rw-r--r-- | src/mongo/s/mock_ns_targeter.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mongo/s/mock_ns_targeter.h b/src/mongo/s/mock_ns_targeter.h index 44bc5be18c2..79c6d517445 100644 --- a/src/mongo/s/mock_ns_targeter.h +++ b/src/mongo/s/mock_ns_targeter.h @@ -211,8 +211,11 @@ private: inline void assertEndpointsEqual(const ShardEndpoint& endpointA, const ShardEndpoint& endpointB) { ASSERT_EQUALS(endpointA.shardName, endpointB.shardName); - ASSERT_EQUALS(endpointA.shardVersion.toLong(), endpointB.shardVersion.toLong()); - ASSERT_EQUALS(endpointA.shardVersion.epoch(), endpointB.shardVersion.epoch()); + ASSERT_EQUALS(endpointA.shardVersion.getVersion().toLong(), + endpointB.shardVersion.getVersion().toLong()); + ASSERT_EQUALS(endpointA.shardVersion.getVersion().epoch(), + endpointB.shardVersion.getVersion().epoch()); + ASSERT_EQUALS(endpointA.shardVersion.getOpTime(), endpointB.shardVersion.getOpTime()); } } // namespace mongo |