summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mongo/db/catalog/database_impl.cpp3
-rw-r--r--src/mongo/db/op_observer/op_observer_impl.cpp3
2 files changed, 5 insertions, 1 deletions
diff --git a/src/mongo/db/catalog/database_impl.cpp b/src/mongo/db/catalog/database_impl.cpp
index dfa0d846762..28c3fa2e8cb 100644
--- a/src/mongo/db/catalog/database_impl.cpp
+++ b/src/mongo/db/catalog/database_impl.cpp
@@ -423,7 +423,8 @@ Status DatabaseImpl::dropCollection(OperationContext* opCtx,
nss == NamespaceString::kKeysCollectionNamespace ||
nss.isTemporaryReshardingCollection() || nss.isTimeseriesBucketsCollection() ||
nss.isChangeStreamPreImagesCollection() ||
- nss == NamespaceString::kConfigsvrRestoreNamespace || nss.isChangeCollection();
+ nss == NamespaceString::kConfigsvrRestoreNamespace || nss.isChangeCollection() ||
+ nss.isSystemDotJavascript();
};
if (nss.isSystem()) {
diff --git a/src/mongo/db/op_observer/op_observer_impl.cpp b/src/mongo/db/op_observer/op_observer_impl.cpp
index 00f0ddc253d..7350a487db8 100644
--- a/src/mongo/db/op_observer/op_observer_impl.cpp
+++ b/src/mongo/db/op_observer/op_observer_impl.cpp
@@ -1357,6 +1357,9 @@ repl::OpTime OpObserverImpl::onDropCollection(OperationContext* opCtx,
ReadWriteConcernDefaults::get(opCtx).invalidate();
} else if (collectionName.isTimeseriesBucketsCollection()) {
BucketCatalog::get(opCtx).clear(collectionName.getTimeseriesViewNamespace());
+ } else if (collectionName.isSystemDotJavascript()) {
+ // Inform the JavaScript engine of the change to system.js.
+ Scope::storedFuncMod(opCtx);
}
return {};