diff options
-rw-r--r-- | jstests/views/views_feature_compatibility_version.js | 20 | ||||
-rw-r--r-- | src/mongo/db/op_observer.cpp | 2 | ||||
-rw-r--r-- | src/mongo/db/views/durable_view_catalog.cpp | 9 | ||||
-rw-r--r-- | src/mongo/db/views/durable_view_catalog.h | 5 |
4 files changed, 0 insertions, 36 deletions
diff --git a/jstests/views/views_feature_compatibility_version.js b/jstests/views/views_feature_compatibility_version.js index 4e3d5ecb252..f6d56302b11 100644 --- a/jstests/views/views_feature_compatibility_version.js +++ b/jstests/views/views_feature_compatibility_version.js @@ -25,16 +25,6 @@ // We can update a view when the featureCompatibilityVersion is 3.4. assert.commandWorked(viewsDB.runCommand({collMod: "view", pipeline: []})); - // We can perform inserts on the system.views collection when the featureCompatibilityVersion is - // 3.4. - assert.writeOK(viewsDB.system.views.insert( - {_id: "views_feature_compatibility_version.view2", viewOn: "collection", pipeline: []})); - - // We can perform updates on the system.views collection when the featureCompatibilityVersion is - // 3.4. - assert.writeOK(viewsDB.system.views.update({_id: "views_feature_compatibility_version.view2"}, - {$set: {viewOn: "collection2"}})); - // We can perform deletes on the system.views collection when the featureCompatibilityVersion is // 3.4. assert.writeOK(viewsDB.system.views.remove({_id: "views_feature_compatibility_version.view2"})); @@ -65,16 +55,6 @@ assert.commandFailed(viewsDB.runCommand({create: "view"})); assert.writeError(viewsDB.view.insert({a: 5})); - // We cannot perform inserts on the system.views collection when the featureCompatibilityVersion - // is 3.2. - assert.writeError(viewsDB.system.views.insert( - {_id: "views_feature_compatibility_version.view2", viewOn: "collection", pipeline: []})); - - // We cannot perform updates on the system.views collection when the featureCompatibilityVersion - // is 3.2. - assert.writeError(viewsDB.system.views.update({_id: "views_feature_compatibility_version.view"}, - {$set: {viewOn: "collection2"}})); - // We can drop a view namespace when the featureCompatibilityVersion is 3.2. assert.eq(true, viewsDB.view.drop()); diff --git a/src/mongo/db/op_observer.cpp b/src/mongo/db/op_observer.cpp index f3e1a3729c8..8defc1c71fe 100644 --- a/src/mongo/db/op_observer.cpp +++ b/src/mongo/db/op_observer.cpp @@ -91,7 +91,6 @@ void OpObserver::onInserts(OperationContext* txn, } if (nss.coll() == DurableViewCatalog::viewsCollectionName()) { DurableViewCatalog::onExternalChange(txn, nss); - DurableViewCatalog::confirm34FeatureCompatibilityVersion(); } } @@ -118,7 +117,6 @@ void OpObserver::onUpdate(OperationContext* txn, const OplogUpdateEntryArgs& arg NamespaceString nss(args.ns); if (nss.coll() == DurableViewCatalog::viewsCollectionName()) { DurableViewCatalog::onExternalChange(txn, nss); - DurableViewCatalog::confirm34FeatureCompatibilityVersion(); } if (args.ns == FeatureCompatibilityVersion::kCollection) { diff --git a/src/mongo/db/views/durable_view_catalog.cpp b/src/mongo/db/views/durable_view_catalog.cpp index 7f7648160df..ba84432b7cf 100644 --- a/src/mongo/db/views/durable_view_catalog.cpp +++ b/src/mongo/db/views/durable_view_catalog.cpp @@ -59,15 +59,6 @@ void DurableViewCatalog::onExternalChange(OperationContext* txn, const Namespace } } -void DurableViewCatalog::confirm34FeatureCompatibilityVersion() { - uassert(40307, - "Cannot perform inserts or updates on system.views collection when " - "the featureCompatibilityVersion is 3.2. See " - "http://dochub.mongodb.org/core/3.4-feature-compatibility.", - serverGlobalParams.featureCompatibilityVersion.load() != - ServerGlobalParams::FeatureCompatibilityVersion_32); -} - // DurableViewCatalogImpl const std::string& DurableViewCatalogImpl::getName() const { diff --git a/src/mongo/db/views/durable_view_catalog.h b/src/mongo/db/views/durable_view_catalog.h index 6ad323198e2..fa94911af53 100644 --- a/src/mongo/db/views/durable_view_catalog.h +++ b/src/mongo/db/views/durable_view_catalog.h @@ -58,11 +58,6 @@ public: */ static void onExternalChange(OperationContext* txn, const NamespaceString& name); - /** - * Throws if featureCompatibilityVersion is 3.2. - */ - static void confirm34FeatureCompatibilityVersion(); - using Callback = stdx::function<void(const BSONObj& view)>; virtual Status iterate(OperationContext* txn, Callback callback) = 0; virtual void upsert(OperationContext* txn, |