[SERVER-14222] Replica set members should disallow dropping local.oplog.rs Created: 10/Jun/14  Updated: 10/Jun/14  Resolved: 10/Jun/14

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: 2.6.1
Fix Version/s: None

Type: Improvement Priority: Trivial - P5
Reporter: Richard Kreuter (Inactive) Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Only tested on OS X, might be different elsewhere.


Issue Links:
Duplicate
duplicates SERVER-8511 Live oplog can be dropped Closed
Participants:

 Description   

By inspection, it is possible to drop local.oplog.rs while a mongod is running as a replica set member (primary or secondary):

rs0:PRIMARY> db.oplog.rs.drop()
true
rs0:PRIMARY> show collections
me
slaves
startup_log
system.indexes
system.replset

When this operation is performed on a node running as primary, the next write operation appears to cause the server to crash:

rs0:PRIMARY> use test
switched to db test
rs0:PRIMARY> db.people.insert({"name":"Jones"});
2014-06-10T16:45:40.891-0400 DBClientCursor::init call() failed
2014-06-10T16:45:40.892-0400 Error: error doing query: failed at src/mongo/shell/collection.js:258

(Clearly this behavior is not intended to be safe, however, it seems as if it would be possible to prohibit such unsafe operations.)


Generated at Thu Feb 08 03:34:12 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.