diff options
author | Antonio Fuschetto <antonio.fuschetto@mongodb.com> | 2022-03-02 08:16:51 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-03-02 08:46:29 +0000 |
commit | 22140dacf9c355f702da3c5d4892df709ceead66 (patch) | |
tree | 58f4ed49ad954a61b998a86416927aedbfe90c9d /src/mongo/s/sharding_router_test_fixture.cpp | |
parent | c0a8cbe58cc46253a94130d2cb64cdd8089b3551 (diff) | |
download | mongo-22140dacf9c355f702da3c5d4892df709ceead66.tar.gz |
SERVER-63742 Default topology time in shard can lead to infinite refresh in shard registry
Diffstat (limited to 'src/mongo/s/sharding_router_test_fixture.cpp')
-rw-r--r-- | src/mongo/s/sharding_router_test_fixture.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/mongo/s/sharding_router_test_fixture.cpp b/src/mongo/s/sharding_router_test_fixture.cpp index f3348801a4e..4e9779773ac 100644 --- a/src/mongo/s/sharding_router_test_fixture.cpp +++ b/src/mongo/s/sharding_router_test_fixture.cpp @@ -46,6 +46,7 @@ #include "mongo/db/query/collation/collator_factory_mock.h" #include "mongo/db/query/query_request_helper.h" #include "mongo/db/repl/read_concern_args.h" +#include "mongo/db/vector_clock.h" #include "mongo/db/vector_clock_metadata_hook.h" #include "mongo/executor/task_executor_pool.h" #include "mongo/executor/thread_pool_task_executor_test_fixture.h" @@ -262,7 +263,9 @@ void ShardingTestFixture::expectGetShards(const std::vector<ShardType>& shards) ASSERT_BSONOBJ_EQ(query->getSort(), BSONObj()); ASSERT_FALSE(query->getLimit().is_initialized()); - checkReadConcern(request.cmdObj, Timestamp(0, 0), repl::OpTime::kUninitializedTerm); + checkReadConcern(request.cmdObj, + VectorClock::kInitialComponentTime.asTimestamp(), + repl::OpTime::kUninitializedTerm); std::vector<BSONObj> shardsToReturn; @@ -358,7 +361,9 @@ void ShardingTestFixture::expectCount(const HostAndPort& configHost, return BSON("ok" << 1 << "n" << response.getValue()); } - checkReadConcern(request.cmdObj, Timestamp(0, 0), repl::OpTime::kUninitializedTerm); + checkReadConcern(request.cmdObj, + VectorClock::kInitialComponentTime.asTimestamp(), + repl::OpTime::kUninitializedTerm); BSONObjBuilder responseBuilder; CommandHelpers::appendCommandStatusNoThrow(responseBuilder, response.getStatus()); |