summaryrefslogtreecommitdiff
path: root/src/mongo/db/s/resharding/resharding_data_copy_util.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/s/resharding/resharding_data_copy_util.cpp')
-rw-r--r--src/mongo/db/s/resharding/resharding_data_copy_util.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mongo/db/s/resharding/resharding_data_copy_util.cpp b/src/mongo/db/s/resharding/resharding_data_copy_util.cpp
index ad85a69d241..f870643e257 100644
--- a/src/mongo/db/s/resharding/resharding_data_copy_util.cpp
+++ b/src/mongo/db/s/resharding/resharding_data_copy_util.cpp
@@ -39,7 +39,9 @@
namespace mongo::resharding::data_copy {
-void ensureCollectionExists(OperationContext* opCtx, const NamespaceString& nss) {
+void ensureCollectionExists(OperationContext* opCtx,
+ const NamespaceString& nss,
+ const CollectionOptions& options) {
invariant(!opCtx->lockState()->isLocked());
invariant(!opCtx->lockState()->inAWriteUnitOfWork());
@@ -50,7 +52,7 @@ void ensureCollectionExists(OperationContext* opCtx, const NamespaceString& nss)
}
WriteUnitOfWork wuow(opCtx);
- coll.ensureDbExists()->createCollection(opCtx, nss);
+ coll.ensureDbExists()->createCollection(opCtx, nss, options);
wuow.commit();
});
}