summaryrefslogtreecommitdiff
path: root/src/mongo/s/mock_ns_targeter.h
diff options
context:
space:
mode:
authorKaloian Manassiev <kaloian.manassiev@mongodb.com>2015-08-13 17:04:55 -0400
committerKaloian Manassiev <kaloian.manassiev@mongodb.com>2015-08-14 15:27:44 -0400
commitcec89b290906adb7d36507d20d619aaa5a6f6c16 (patch)
tree7f9bc55b68751f87c78046aa23294e29e7034a1b /src/mongo/s/mock_ns_targeter.h
parent914c12f4c7e850cacc6292bc330101579a0627ef (diff)
downloadmongo-cec89b290906adb7d36507d20d619aaa5a6f6c16.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.h7
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