diff options
author | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2022-06-21 16:21:21 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-06-21 17:53:02 +0000 |
commit | b11292a5e8ee11f3302636f9ba80b33876fbfa94 (patch) | |
tree | 9e6b6267dcad44c87eda77c953cccb3cb70b785b /src/mongo/db/pipeline | |
parent | 22efe2b8f4f211bbd5b89b42d274e55af181789d (diff) | |
download | mongo-b11292a5e8ee11f3302636f9ba80b33876fbfa94.tar.gz |
SERVER-67400 Introduce a CollectionPlacement component of the collection version
Diffstat (limited to 'src/mongo/db/pipeline')
3 files changed, 4 insertions, 10 deletions
diff --git a/src/mongo/db/pipeline/dispatch_shard_pipeline_test.cpp b/src/mongo/db/pipeline/dispatch_shard_pipeline_test.cpp index 069a7e2f0b2..effa178fc32 100644 --- a/src/mongo/db/pipeline/dispatch_shard_pipeline_test.cpp +++ b/src/mongo/db/pipeline/dispatch_shard_pipeline_test.cpp @@ -175,7 +175,7 @@ TEST_F(DispatchShardPipelineTest, DispatchShardPipelineDoesNotRetryOnStaleConfig OID epoch{OID::gen()}; Timestamp timestamp{1, 0}; return createErrorCursorResponse({StaleConfigInfo(kTestAggregateNss, - ChunkVersion(1, 0, epoch, timestamp), + ChunkVersion({epoch, timestamp}, {1, 0}), boost::none, ShardId{"0"}), "Mock error: shard version mismatch"}); @@ -218,7 +218,7 @@ TEST_F(DispatchShardPipelineTest, WrappedDispatchDoesRetryOnStaleConfigError) { // namespace, then mock out a successful response. onCommand([&](const executor::RemoteCommandRequest& request) { return createErrorCursorResponse({StaleConfigInfo(kTestAggregateNss, - ChunkVersion(2, 0, epoch, timestamp), + ChunkVersion({epoch, timestamp}, {2, 0}), boost::none, ShardId{"0"}), "Mock error: shard version mismatch"}); @@ -227,7 +227,7 @@ TEST_F(DispatchShardPipelineTest, WrappedDispatchDoesRetryOnStaleConfigError) { // Mock the expected config server queries. const ShardKeyPattern shardKeyPattern(BSON("_id" << 1)); - ChunkVersion version(2, 0, epoch, timestamp); + ChunkVersion version({epoch, timestamp}, {2, 0}); ChunkType chunk1( uuid, {shardKeyPattern.getKeyPattern().globalMin(), BSON("_id" << 0)}, version, {"0"}); diff --git a/src/mongo/db/pipeline/process_interface/mongos_process_interface_test.cpp b/src/mongo/db/pipeline/process_interface/mongos_process_interface_test.cpp index 83b35a0c9fc..30de3fbfb1f 100644 --- a/src/mongo/db/pipeline/process_interface/mongos_process_interface_test.cpp +++ b/src/mongo/db/pipeline/process_interface/mongos_process_interface_test.cpp @@ -27,8 +27,6 @@ * it in the license file. */ -#include "mongo/platform/basic.h" - #include "mongo/db/pipeline/aggregation_context_fixture.h" #include "mongo/db/pipeline/process_interface/mongos_process_interface.h" #include "mongo/unittest/unittest.h" @@ -63,7 +61,7 @@ public: TEST_F(MongosProcessInterfaceTest, FailsToEnsureFieldsUniqueIfTargetCollectionVersionIsSpecified) { auto expCtx = getExpCtx(); auto targetCollectionVersion = - boost::make_optional(ChunkVersion(0, 0, OID::gen(), Timestamp(1, 1))); + boost::make_optional(ChunkVersion({OID::gen(), Timestamp(1, 1)}, {0, 0})); auto processInterface = makeProcessInterface(); ASSERT_THROWS_CODE(processInterface->ensureFieldsUniqueOrResolveDocumentKey( diff --git a/src/mongo/db/pipeline/resharding_initial_split_policy_test.cpp b/src/mongo/db/pipeline/resharding_initial_split_policy_test.cpp index bc17e9d0133..2df79a991d4 100644 --- a/src/mongo/db/pipeline/resharding_initial_split_policy_test.cpp +++ b/src/mongo/db/pipeline/resharding_initial_split_policy_test.cpp @@ -27,9 +27,6 @@ * it in the license file. */ - -#include "mongo/platform/basic.h" - #include "mongo/db/catalog/collection_catalog.h" #include "mongo/db/pipeline/document_source_mock.h" #include "mongo/db/pipeline/sharded_agg_helpers.h" @@ -39,7 +36,6 @@ #define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest - namespace mongo { namespace { |