diff options
Diffstat (limited to 'src/mongo/db/s')
4 files changed, 20 insertions, 22 deletions
diff --git a/src/mongo/db/s/balancer/migration_manager.cpp b/src/mongo/db/s/balancer/migration_manager.cpp index 381f54b0669..31f557380aa 100644 --- a/src/mongo/db/s/balancer/migration_manager.cpp +++ b/src/mongo/db/s/balancer/migration_manager.cpp @@ -219,7 +219,7 @@ void MigrationManager::startRecoveryAndAcquireDistLocks(OperationContext* txn) { // Load the active migrations from the config.migrations collection. auto statusWithMigrationsQueryResponse = - Grid::get(txn)->shardRegistry()->getConfigShard()->exhaustiveFindOnConfig( + Grid::get(txn)->shardRegistry()->getConfigShard()->exhaustiveFind( txn, ReadPreferenceSetting{ReadPreference::PrimaryOnly}, repl::ReadConcernLevel::kLocalReadConcern, diff --git a/src/mongo/db/s/balancer/migration_manager_test.cpp b/src/mongo/db/s/balancer/migration_manager_test.cpp index aa09c329844..2f2012b1ee9 100644 --- a/src/mongo/db/s/balancer/migration_manager_test.cpp +++ b/src/mongo/db/s/balancer/migration_manager_test.cpp @@ -231,20 +231,19 @@ void MigrationManagerTest::setUpMigration(const ChunkType& chunk, const ShardId& } void MigrationManagerTest::checkMigrationsCollectionIsEmptyAndLocksAreUnlocked() { - auto statusWithMigrationsQueryResponse = - shardRegistry()->getConfigShard()->exhaustiveFindOnConfig( - operationContext(), - ReadPreferenceSetting{ReadPreference::PrimaryOnly}, - repl::ReadConcernLevel::kMajorityReadConcern, - NamespaceString(MigrationType::ConfigNS), - BSONObj(), - BSONObj(), - boost::none); + auto statusWithMigrationsQueryResponse = shardRegistry()->getConfigShard()->exhaustiveFind( + operationContext(), + ReadPreferenceSetting{ReadPreference::PrimaryOnly}, + repl::ReadConcernLevel::kMajorityReadConcern, + NamespaceString(MigrationType::ConfigNS), + BSONObj(), + BSONObj(), + boost::none); Shard::QueryResponse migrationsQueryResponse = uassertStatusOK(statusWithMigrationsQueryResponse); ASSERT_EQUALS(0U, migrationsQueryResponse.docs.size()); - auto statusWithLocksQueryResponse = shardRegistry()->getConfigShard()->exhaustiveFindOnConfig( + auto statusWithLocksQueryResponse = shardRegistry()->getConfigShard()->exhaustiveFind( operationContext(), ReadPreferenceSetting{ReadPreference::PrimaryOnly}, repl::ReadConcernLevel::kMajorityReadConcern, @@ -553,15 +552,14 @@ TEST_F(MigrationManagerTest, InterruptMigration) { // Check that the migration that was active when the migration manager was interrupted can be // found in config.migrations (and thus would be recovered if a migration manager were to start // up again). - auto statusWithMigrationsQueryResponse = - shardRegistry()->getConfigShard()->exhaustiveFindOnConfig( - operationContext(), - ReadPreferenceSetting{ReadPreference::PrimaryOnly}, - repl::ReadConcernLevel::kMajorityReadConcern, - NamespaceString(MigrationType::ConfigNS), - BSON(MigrationType::name(chunk.getName())), - BSONObj(), - boost::none); + auto statusWithMigrationsQueryResponse = shardRegistry()->getConfigShard()->exhaustiveFind( + operationContext(), + ReadPreferenceSetting{ReadPreference::PrimaryOnly}, + repl::ReadConcernLevel::kMajorityReadConcern, + NamespaceString(MigrationType::ConfigNS), + BSON(MigrationType::name(chunk.getName())), + BSONObj(), + boost::none); Shard::QueryResponse migrationsQueryResponse = uassertStatusOK(statusWithMigrationsQueryResponse); ASSERT_EQUALS(1U, migrationsQueryResponse.docs.size()); diff --git a/src/mongo/db/s/balancer/scoped_migration_request.cpp b/src/mongo/db/s/balancer/scoped_migration_request.cpp index af737fd0640..c422551892b 100644 --- a/src/mongo/db/s/balancer/scoped_migration_request.cpp +++ b/src/mongo/db/s/balancer/scoped_migration_request.cpp @@ -106,7 +106,7 @@ StatusWith<ScopedMigrationRequest> ScopedMigrationRequest::writeMigration( // for the request because this migration request will join the active one once // scheduled. auto statusWithMigrationQueryResult = - grid.shardRegistry()->getConfigShard()->exhaustiveFindOnConfig( + grid.shardRegistry()->getConfigShard()->exhaustiveFind( txn, ReadPreferenceSetting{ReadPreference::PrimaryOnly}, repl::ReadConcernLevel::kLocalReadConcern, diff --git a/src/mongo/db/s/balancer/scoped_migration_request_test.cpp b/src/mongo/db/s/balancer/scoped_migration_request_test.cpp index 10fb8da0e22..d636b739ad8 100644 --- a/src/mongo/db/s/balancer/scoped_migration_request_test.cpp +++ b/src/mongo/db/s/balancer/scoped_migration_request_test.cpp @@ -67,7 +67,7 @@ public: void ScopedMigrationRequestTest::checkMigrationsCollectionForDocument( std::string chunkName, const unsigned long expectedNumberOfDocuments) { - auto response = shardRegistry()->getConfigShard()->exhaustiveFindOnConfig( + auto response = shardRegistry()->getConfigShard()->exhaustiveFind( operationContext(), ReadPreferenceSetting{ReadPreference::PrimaryOnly}, repl::ReadConcernLevel::kMajorityReadConcern, |