summaryrefslogtreecommitdiff
path: root/src/mongo/s/commands
diff options
context:
space:
mode:
authorSviatlana Zuiko <sviatlana.zuiko@mongodb.com>2021-05-11 18:04:04 +0300
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-05-11 16:37:58 +0000
commit01018b26d53b9561250374c2864e54016d54e034 (patch)
treedc8e0887a99166c4d8a378383b87f0c326021bc4 /src/mongo/s/commands
parent8951dcb47708e988e75565e4a8fa4bf8eb941d03 (diff)
downloadmongo-01018b26d53b9561250374c2864e54016d54e034.tar.gz
Revert "SERVER-50549 transform state-changing errors returned by mongos"
This reverts commit 1e10e32780ca47969342f6b52bfe09bc4134831e.
Diffstat (limited to 'src/mongo/s/commands')
-rw-r--r--src/mongo/s/commands/SConscript1
-rw-r--r--src/mongo/s/commands/cluster_hello_cmd.cpp4
-rw-r--r--src/mongo/s/commands/strategy.cpp6
3 files changed, 0 insertions, 11 deletions
diff --git a/src/mongo/s/commands/SConscript b/src/mongo/s/commands/SConscript
index 7af30c8530e..8a109f999f4 100644
--- a/src/mongo/s/commands/SConscript
+++ b/src/mongo/s/commands/SConscript
@@ -149,7 +149,6 @@ env.Library(
'$BUILD_DIR/mongo/executor/async_request_executor',
'$BUILD_DIR/mongo/idl/server_parameter',
'$BUILD_DIR/mongo/rpc/client_metadata',
- '$BUILD_DIR/mongo/rpc/rewrite_state_change_errors',
'$BUILD_DIR/mongo/s/cluster_last_error_info',
'$BUILD_DIR/mongo/s/mongos_topology_coordinator',
'$BUILD_DIR/mongo/s/query/cluster_aggregate',
diff --git a/src/mongo/s/commands/cluster_hello_cmd.cpp b/src/mongo/s/commands/cluster_hello_cmd.cpp
index 16a9a3a5c04..c2ad55c4ba7 100644
--- a/src/mongo/s/commands/cluster_hello_cmd.cpp
+++ b/src/mongo/s/commands/cluster_hello_cmd.cpp
@@ -45,7 +45,6 @@
#include "mongo/db/wire_version.h"
#include "mongo/logv2/log.h"
#include "mongo/rpc/metadata/client_metadata.h"
-#include "mongo/rpc/rewrite_state_change_errors.h"
#include "mongo/rpc/topology_version_gen.h"
#include "mongo/s/mongos_topology_coordinator.h"
#include "mongo/transport/message_compressor_manager.h"
@@ -107,9 +106,6 @@ public:
waitInHello.pauseWhileSet(opCtx);
- // "hello" is exempt from error code rewrites.
- rpc::RewriteStateChangeErrors::setEnabled(opCtx, false);
-
auto client = opCtx->getClient();
if (ClientMetadata::tryFinalize(client)) {
audit::logClientMetadata(client);
diff --git a/src/mongo/s/commands/strategy.cpp b/src/mongo/s/commands/strategy.cpp
index 82c30bd02e3..4429987d9f3 100644
--- a/src/mongo/s/commands/strategy.cpp
+++ b/src/mongo/s/commands/strategy.cpp
@@ -73,7 +73,6 @@
#include "mongo/rpc/metadata/tracking_metadata.h"
#include "mongo/rpc/op_msg.h"
#include "mongo/rpc/op_msg_rpc_impls.h"
-#include "mongo/rpc/rewrite_state_change_errors.h"
#include "mongo/s/catalog_cache.h"
#include "mongo/s/client/shard_registry.h"
#include "mongo/s/cluster_commands_helpers.h"
@@ -1326,11 +1325,6 @@ DbResponse ClientCommand::_produceResponse() {
dbResponse.nextInvocation = reply->getNextInvocation();
}
}
- if (auto doc = rpc::RewriteStateChangeErrors::rewrite(reply->getBodyBuilder().asTempObj(),
- _rec->getOpCtx())) {
- reply->reset();
- reply->getBodyBuilder().appendElements(*doc);
- }
dbResponse.response = reply->done();
return dbResponse;