summaryrefslogtreecommitdiff
path: root/src/mongo/db/s/shard_local.cpp
diff options
context:
space:
mode:
authorLucas de Castro Borges <lucas@gnuabordo.com.br>2025-02-11 15:07:35 -0300
committerLucas de Castro Borges <lucas@gnuabordo.com.br>2025-02-11 15:07:35 -0300
commit4cb8841196d0625dfa3825aa326f071cd27c7b8b (patch)
tree1682a647d4463397c119183369ae6f750d5fdcff /src/mongo/db/s/shard_local.cpp
parentaa03c6362cbaa767638e6eed9b031d86dd2643d1 (diff)
parent8f0827553e09872941945a093b647a4211a9db7f (diff)
Update upstream source from tag 'upstream/6.0.0'master
Update to upstream version '6.0.0' with Debian dir 5604a80ec1c96ca76f25f40d78e6ef855abec322
Diffstat (limited to 'src/mongo/db/s/shard_local.cpp')
-rw-r--r--src/mongo/db/s/shard_local.cpp22
1 files changed, 1 insertions, 21 deletions
diff --git a/src/mongo/db/s/shard_local.cpp b/src/mongo/db/s/shard_local.cpp
index 229a61e8480..69ca9ba6332 100644
--- a/src/mongo/db/s/shard_local.cpp
+++ b/src/mongo/db/s/shard_local.cpp
@@ -36,7 +36,7 @@
#include "mongo/client/remote_command_targeter.h"
#include "mongo/db/catalog/index_catalog.h"
#include "mongo/db/catalog_raii.h"
-#include "mongo/db/concurrency/exception_util.h"
+#include "mongo/db/concurrency/write_conflict_exception.h"
#include "mongo/db/index/index_descriptor.h"
#include "mongo/db/index_builds_coordinator.h"
#include "mongo/db/repl/repl_client_info.h"
@@ -227,24 +227,4 @@ Status ShardLocal::runAggregation(
return _rsLocalClient.runAggregation(opCtx, aggRequest, callback);
}
-BatchedCommandResponse ShardLocal::runBatchWriteCommand(OperationContext* opCtx,
- const Milliseconds maxTimeMS,
- const BatchedCommandRequest& batchRequest,
- const WriteConcernOptions& writeConcern,
- RetryPolicy retryPolicy) {
- // A request dispatched through a local client is served within the same thread that submits it
- // (so that the opCtx needs to be used as the vehicle to pass the WC to the ServiceEntryPoint).
- const auto originalWC = opCtx->getWriteConcern();
- ScopeGuard resetWCGuard([&] { opCtx->setWriteConcern(originalWC); });
- opCtx->setWriteConcern(writeConcern);
-
- const auto dbName = batchRequest.getNS().db();
- const BSONObj cmdObj = [&] {
- BSONObjBuilder cmdObjBuilder;
- batchRequest.serialize(&cmdObjBuilder);
- return cmdObjBuilder.obj();
- }();
-
- return _submitBatchWriteCommand(opCtx, cmdObj, dbName, maxTimeMS, retryPolicy);
-}
} // namespace mongo