summaryrefslogtreecommitdiff
path: root/src/mongo/db/s/drop_collection_coordinator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/s/drop_collection_coordinator.cpp')
-rw-r--r--src/mongo/db/s/drop_collection_coordinator.cpp18
1 files changed, 3 insertions, 15 deletions
diff --git a/src/mongo/db/s/drop_collection_coordinator.cpp b/src/mongo/db/s/drop_collection_coordinator.cpp
index 5caf5edca7f..d2ca980dd9a 100644
--- a/src/mongo/db/s/drop_collection_coordinator.cpp
+++ b/src/mongo/db/s/drop_collection_coordinator.cpp
@@ -109,20 +109,6 @@ void DropCollectionCoordinator::_enterPhase(Phase newPhase) {
_doc = _updateStateDocument(cc().makeOperationContext().get(), std::move(newDoc));
}
-void DropCollectionCoordinator::_performNoopRetryableWriteOnParticipants(
- OperationContext* opCtx, const std::shared_ptr<executor::TaskExecutor>& executor) {
- auto shardsAndConfigsvr = [&] {
- const auto shardRegistry = Grid::get(opCtx)->shardRegistry();
- auto participants = shardRegistry->getAllShardIds(opCtx);
- participants.emplace_back(shardRegistry->getConfigShard()->getId());
- return participants;
- }();
-
- _doc = _updateSession(opCtx, _doc);
- sharding_ddl_util::performNoopRetryableWriteOnShards(
- opCtx, shardsAndConfigsvr, getCurrentSession(_doc), executor);
-}
-
ExecutorFuture<void> DropCollectionCoordinator::_runImpl(
std::shared_ptr<executor::ScopedTaskExecutor> executor,
const CancellationToken& token) noexcept {
@@ -171,7 +157,9 @@ ExecutorFuture<void> DropCollectionCoordinator::_runImpl(
// Perform a noop write on the participants in order to advance the txnNumber
// for this coordinator's lsid so that requests with older txnNumbers can no
// longer execute.
- _performNoopRetryableWriteOnParticipants(opCtx, **executor);
+ _doc = _updateSession(opCtx, _doc);
+ _performNoopRetryableWriteOnAllShardsAndConfigsvr(
+ opCtx, getCurrentSession(_doc), **executor);
}
const auto collIsSharded = bool(_doc.getCollInfo());