[SERVER-63201] Relax restriction of deletion ops in applyOps command. Created: 28/Dec/21  Updated: 29/Oct/23  Resolved: 10/Feb/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 5.3.0, 5.0.7

Type: Improvement Priority: Major - P3
Reporter: Huan Li Assignee: Gregory Wlodarek
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Documented
is documented by DOCS-15080 Investigate changes in SERVER-63201: ... Closed
Problem/Incident
causes SERVER-65261 Deleting from a capped collection via... Closed
causes PYTHON-3225 Test Failure - test_collection.TestCo... Closed
Related
related to GODRIVER-2315 Fix tests that expect errors on cappe... Closed
related to SERVER-64369 Must not allow deletes from capped co... Closed
Backwards Compatibility: Fully Compatible
Backport Requested:
v5.0
Sprint: Execution Team 2022-02-21
Participants:
Case:
Linked BF Score: 150

 Description   

Problem Statement/Rationale

MongoDB doesn't allow deletion on capped collection. When Mongorestore performs restore with oplog replay, it should ignore the delete operation on the capped collection.  Otherwise, mongorestore will fail with the following error message:

Failed: restore error: error applying oplog: applyOps: (IllegalOperation) cannot remove from a capped collection: test.cappedColl

 ===========================================
After discussion, we think the server should relax the restriction on applyOps for deletion since what mongorestore does with applyOps is very much like the initial sync during replication.

 



 Comments   
Comment by Githook User [ 07/Mar/22 ]

Author:

{'name': 'Gregory Wlodarek', 'email': 'gregory.wlodarek@mongodb.com', 'username': 'GWlodarek'}

Message: SERVER-63201 Allow user deletes on capped collections
Branch: v5.0
https://github.com/mongodb/mongo/commit/b6f2129ad1c00c474586625efaa8880fb8eac331

Comment by Githook User [ 10/Feb/22 ]

Author:

{'name': 'Gregory Wlodarek', 'email': 'gregory.wlodarek@mongodb.com', 'username': 'GWlodarek'}

Message: SERVER-63201 Allow user deletes on capped collections
Branch: master
https://github.com/mongodb/mongo/commit/a1d291fdaf2389e9b5999e759a8486bd344ff1cb

Comment by Huan Li [ 01/Feb/22 ]

daniel.gottlieb redbeard0531 Just wanna make sure this is not fall out of the attention. Could the server team work on this ticket or do you prefer a new SERVER ticket for this issue? Thanks!

Comment by Jessica Sigafoos [ 11/Jan/22 ]

Let's ask server is applyops can do the deletes on capped collections. We can also see if the delete oplog entries indicate that they're from a capped collection in any way – if so the other options are more feasible.

Comment by Jessica Sigafoos [ 04/Jan/22 ]

We could ignore the deletions in the restore, or we could not export the deletions in the dump.

Generated at Thu Feb 08 05:57:08 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.