diff options
author | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2022-02-07 16:50:03 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-02-07 20:30:56 +0000 |
commit | 522da292b8e89d6288916f744f318cb1f32ac8a8 (patch) | |
tree | ae361da0444a406929da01bfb50786ba8387a1b1 /src/mongo/s/commands | |
parent | ccd044ecf761baf8a8cb6487b2ebe676e6611599 (diff) | |
download | mongo-522da292b8e89d6288916f744f318cb1f32ac8a8.tar.gz |
SERVER-63331 Remove useless methods from BatchCommandResponse
Diffstat (limited to 'src/mongo/s/commands')
-rw-r--r-- | src/mongo/s/commands/cluster_command_test_fixture.cpp | 1 | ||||
-rw-r--r-- | src/mongo/s/commands/cluster_command_test_fixture.h | 1 | ||||
-rw-r--r-- | src/mongo/s/commands/cluster_explain.h | 1 | ||||
-rw-r--r-- | src/mongo/s/commands/strategy.cpp | 7 | ||||
-rw-r--r-- | src/mongo/s/commands/strategy.h | 12 |
5 files changed, 4 insertions, 18 deletions
diff --git a/src/mongo/s/commands/cluster_command_test_fixture.cpp b/src/mongo/s/commands/cluster_command_test_fixture.cpp index 6b1daa92292..49b3c7771e1 100644 --- a/src/mongo/s/commands/cluster_command_test_fixture.cpp +++ b/src/mongo/s/commands/cluster_command_test_fixture.cpp @@ -41,6 +41,7 @@ #include "mongo/db/logical_time_validator.h" #include "mongo/db/read_write_concern_defaults.h" #include "mongo/db/vector_clock.h" +#include "mongo/s/commands/strategy.h" #include "mongo/util/fail_point.h" #include "mongo/util/options_parser/startup_option_init.h" #include "mongo/util/tick_source_mock.h" diff --git a/src/mongo/s/commands/cluster_command_test_fixture.h b/src/mongo/s/commands/cluster_command_test_fixture.h index 3f379052ff9..b1e3a84588c 100644 --- a/src/mongo/s/commands/cluster_command_test_fixture.h +++ b/src/mongo/s/commands/cluster_command_test_fixture.h @@ -33,7 +33,6 @@ #include "mongo/db/read_write_concern_defaults_cache_lookup_mock.h" #include "mongo/s/catalog_cache_test_fixture.h" -#include "mongo/s/commands/strategy.h" namespace mongo { diff --git a/src/mongo/s/commands/cluster_explain.h b/src/mongo/s/commands/cluster_explain.h index 60570c855d3..f1ff6716de8 100644 --- a/src/mongo/s/commands/cluster_explain.h +++ b/src/mongo/s/commands/cluster_explain.h @@ -33,7 +33,6 @@ #include "mongo/db/query/explain_options.h" #include "mongo/s/async_requests_sender.h" -#include "mongo/s/commands/strategy.h" namespace mongo { diff --git a/src/mongo/s/commands/strategy.cpp b/src/mongo/s/commands/strategy.cpp index b9d903e6685..668241285ce 100644 --- a/src/mongo/s/commands/strategy.cpp +++ b/src/mongo/s/commands/strategy.cpp @@ -98,8 +98,6 @@ #include "mongo/util/str.h" #include "mongo/util/timer.h" -using namespace fmt::literals; - namespace mongo { namespace { @@ -884,7 +882,7 @@ void ParseAndRunCommand::RunAndRetry::_setup() { if (readConcernArgs.getLevel() == repl::ReadConcernLevel::kSnapshotReadConcern && !TransactionRouter::get(opCtx) && (!readConcernArgs.getArgsAtClusterTime() || readConcernArgs.wasAtClusterTimeSelected())) { - auto atClusterTime = [](OperationContext* opCtx, ReadConcernArgs& readConcernArgs) { + auto atClusterTime = [](OperationContext* opCtx, repl::ReadConcernArgs& readConcernArgs) { const auto latestKnownTime = VectorClock::get(opCtx)->getTime(); // Choose a time after the user-supplied afterClusterTime. auto afterClusterTime = readConcernArgs.getArgsAfterClusterTime(); @@ -1025,7 +1023,7 @@ void ParseAndRunCommand::RunAndRetry::_onSnapshotError(Status& status) { auto opCtx = _parc->_rec->getOpCtx(); if (auto txnRouter = TransactionRouter::get(opCtx); - !txnRouter && !ReadConcernArgs::get(opCtx).wasAtClusterTimeSelected()) { + !txnRouter && !repl::ReadConcernArgs::get(opCtx).wasAtClusterTimeSelected()) { // Non-transaction snapshot read. The client sent readConcern: {level: "snapshot", // atClusterTime: T}, where T is older than minSnapshotHistoryWindowInSeconds, retrying // won't succeed. @@ -1282,4 +1280,5 @@ Future<DbResponse> Strategy::clientCommand(std::shared_ptr<RequestExecutionConte return runner->run(); }); } + } // namespace mongo diff --git a/src/mongo/s/commands/strategy.h b/src/mongo/s/commands/strategy.h index 03b9088f9d4..1e04130f657 100644 --- a/src/mongo/s/commands/strategy.h +++ b/src/mongo/s/commands/strategy.h @@ -29,22 +29,10 @@ #pragma once -#include <atomic> - -#include "mongo/client/connection_string.h" -#include "mongo/db/query/explain_options.h" #include "mongo/db/request_execution_context.h" -#include "mongo/s/client/shard.h" namespace mongo { -class DbMessage; -struct DbResponse; -class Message; -class NamespaceString; -class OperationContext; -class FindCommandRequest; - /** * Legacy interface for processing client read/write/cmd requests. */ |