summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaloian Manassiev <kaloian.manassiev@mongodb.com>2021-03-18 07:45:41 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-03-18 18:02:42 +0000
commite16dbf0d24cbf1480469417098405f39daa0ebac (patch)
treee1100373c48fd098752eed3030a092388ea0b6be
parent54a41757d77002b015c7bceca87c59f35e5a564f (diff)
downloadmongo-e16dbf0d24cbf1480469417098405f39daa0ebac.tar.gz
SERVER-52778 Remove vestiges of the now-unused 'allowImplicitCollectionCreation' field
-rw-r--r--src/mongo/db/s/shard_server_op_observer.cpp2
-rw-r--r--src/mongo/db/service_entry_point_common.cpp3
-rw-r--r--src/mongo/db/sessions_collection.cpp1
3 files changed, 1 insertions, 5 deletions
diff --git a/src/mongo/db/s/shard_server_op_observer.cpp b/src/mongo/db/s/shard_server_op_observer.cpp
index f8877f53aed..fd5f48278aa 100644
--- a/src/mongo/db/s/shard_server_op_observer.cpp
+++ b/src/mongo/db/s/shard_server_op_observer.cpp
@@ -488,7 +488,7 @@ void ShardServerOpObserver::onCreateCollection(OperationContext* opCtx,
// TODO (SERVER-52778): Delete the lines below once all usages of
// ScopedAllowImplicitCollectionCreate_UNSAFE have been removed
auto* const csr = CollectionShardingRuntime::get(opCtx, collectionName);
- if (opCtx->writesAreReplicated() && !csr->getCurrentMetadataIfKnown()) {
+ if (!csr->getCurrentMetadataIfKnown()) {
csr->setFilteringMetadata(opCtx, CollectionMetadata());
}
}
diff --git a/src/mongo/db/service_entry_point_common.cpp b/src/mongo/db/service_entry_point_common.cpp
index 0abb6b54bc9..d5cebe87f0f 100644
--- a/src/mongo/db/service_entry_point_common.cpp
+++ b/src/mongo/db/service_entry_point_common.cpp
@@ -1355,7 +1355,6 @@ void ExecCommandDatabase::_initiateCommand() {
BSONElement cmdOptionMaxTimeMSField;
BSONElement maxTimeMSOpOnlyField;
- BSONElement allowImplicitCollectionCreationField;
BSONElement helpField;
StringMap<int> topLevelFields;
@@ -1368,8 +1367,6 @@ void ExecCommandDatabase::_initiateCommand() {
"Can not specify maxTimeMSOpOnly for non internal clients",
_isInternalClient());
maxTimeMSOpOnlyField = element;
- } else if (fieldName == "allowImplicitCollectionCreation") {
- allowImplicitCollectionCreationField = element;
} else if (fieldName == CommandHelpers::kHelpFieldName) {
helpField = element;
} else if (fieldName == "comment") {
diff --git a/src/mongo/db/sessions_collection.cpp b/src/mongo/db/sessions_collection.cpp
index a219515ba7a..9864cc11aa9 100644
--- a/src/mongo/db/sessions_collection.cpp
+++ b/src/mongo/db/sessions_collection.cpp
@@ -196,7 +196,6 @@ void SessionsCollection::_doRefresh(const NamespaceString& ns,
auto init = [ns](BSONObjBuilder* batch) {
batch->append("update", ns.coll());
batch->append("ordered", false);
- batch->append("allowImplicitCollectionCreation", false);
batch->append(WriteConcernOptions::kWriteConcernField, kMajorityWriteConcern.toBSON());
};