Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-14222

Replica set members should disallow dropping local.oplog.rs

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Duplicate
    • Icon: Trivial - P5 Trivial - P5
    • None
    • 2.6.1
    • Replication
    • None
    • Only tested on OS X, might be different elsewhere.

    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.)

      Attachments

        Activity

          People

            Unassigned Unassigned
            richard.kreuter Richard Kreuter (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: