[SERVER-30830] applyOps should return NamespaceNotFound when applying a CRUD operation on a non-existent collection/database Created: 25/Aug/17  Updated: 30/Oct/23  Resolved: 20/Sep/17

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: None
Fix Version/s: 3.4.10, 3.6.0-rc0

Type: Bug Priority: Major - P3
Reporter: Benety Goh Assignee: Benety Goh
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Duplicate
is duplicated by SERVER-31471 Certain applyOps and convertToCapped ... Closed
Related
related to SERVER-63907 Remove code or fix comment referring ... Closed
is related to SERVER-27246 Running applyOps with an op on a none... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Completed:
Participants:
Linked BF Score: 0

 Description   

Currently applyOps relies on lower level subsystems such as the catalog or query execution subsystem to handle CRUD operations that refer to non-existent collections or databases. Some CRUD operations, such as update/upserts, may implicitly create a collection as a result. We should uniformly reject any CRUD operations on non-existent namespaces in apply_ops.cpp (within the _applyOps() function).



 Comments   
Comment by Githook User [ 28/Sep/17 ]

Author:

{'email': 'benety@mongodb.com', 'name': 'Benety Goh', 'username': 'benety'}

Message: SERVER-30830 applyOps checks if collection/database exists before applying CRUD operation

(cherry-picked from commit f91a71089a6d465d8f938e8b2a6a561fe5ab5f91)
Branch: v3.4
https://github.com/mongodb/mongo/commit/46881eff440b732b928e7b013905dcfae287d88f

Comment by Githook User [ 20/Sep/17 ]

Author:

{'email': 'benety@mongodb.com', 'name': 'Benety Goh', 'username': 'benety'}

Message: SERVER-30830 applyOps checks if collection/database exists before applying CRUD operation
Branch: master
https://github.com/mongodb/mongo/commit/79dea38841fedff2b0137069f60fb75921607ead

Comment by Githook User [ 05/Sep/17 ]

Author:

{'username': 'benety', 'name': 'Benety Goh', 'email': 'benety@mongodb.com'}

Message: Revert "SERVER-30830 fix apply_ops_atomicity.js test case per new applyOps behavior"

This reverts commit 5a241f9d630d6fc7f4c5ae900a834f6ee39f6ebf.
Branch: master
https://github.com/mongodb/mongo/commit/dbaf6d6c8e5094c78e9e633dc008c28bf2449293

Comment by Githook User [ 05/Sep/17 ]

Author:

{'username': 'benety', 'name': 'Benety Goh', 'email': 'benety@mongodb.com'}

Message: SERVER-30830 fix apply_ops_atomicity.js test case per new applyOps behavior
Branch: master
https://github.com/mongodb/mongo/commit/5a241f9d630d6fc7f4c5ae900a834f6ee39f6ebf

Comment by Benety Goh [ 25/Aug/17 ]

For idempotency reasons, we may want to exclude delete operations from this check.

Generated at Thu Feb 08 04:25:09 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.