summaryrefslogtreecommitdiff
path: root/src/mongo/db/op_observer_impl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/op_observer_impl.cpp')
-rw-r--r--src/mongo/db/op_observer_impl.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mongo/db/op_observer_impl.cpp b/src/mongo/db/op_observer_impl.cpp
index 6da9b7f9599..cdc1dbc4756 100644
--- a/src/mongo/db/op_observer_impl.cpp
+++ b/src/mongo/db/op_observer_impl.cpp
@@ -437,8 +437,11 @@ void OpObserverImpl::onDelete(OperationContext* opCtx,
Scope::storedFuncMod(opCtx);
} else if (nss.coll() == DurableViewCatalog::viewsCollectionName()) {
DurableViewCatalog::onExternalChange(opCtx, nss);
- } else if (nss.ns() == FeatureCompatibilityVersion::kCollection) {
- FeatureCompatibilityVersion::onDelete(opCtx, deleteState.documentKey);
+ } else if (nss.isAdminDotSystemDotVersion()) {
+ auto _id = deleteState.documentKey["_id"];
+ if (_id.type() == BSONType::String &&
+ _id.String() == FeatureCompatibilityVersion::kParameterName)
+ uasserted(40670, "removing FeatureCompatibilityVersion document is not allowed");
} else if (nss == NamespaceString::kSessionTransactionsTableNamespace &&
!opTime.writeOpTime.isNull()) {
SessionCatalog::get(opCtx)->invalidateSessions(opCtx, deleteState.documentKey);