diff options
-rw-r--r-- | src/mongo/db/s/create_collection_coordinator.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mongo/db/s/create_collection_coordinator.cpp b/src/mongo/db/s/create_collection_coordinator.cpp index 31d302b9989..2f3c292cc53 100644 --- a/src/mongo/db/s/create_collection_coordinator.cpp +++ b/src/mongo/db/s/create_collection_coordinator.cpp @@ -493,6 +493,13 @@ ExecutorFuture<void> CreateCollectionCoordinator::_runImpl( getCollation(opCtx, nss(), _request.getCollation()).second, _request.getUnique().value_or(false))) { + // Ensure that the completion of the request gets recorded at least once on the + // oplog. + _writeOplogMessage(opCtx, + nss(), + *createCollectionResponseOpt->getCollectionUUID(), + _request.toBSON()); + // The critical section can still be held here if the node committed the // sharding of the collection but then it stepped down before it managed to // delete the coordinator document |