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

Enabling sharding creates a database without an oplog entry

    • Type: Icon: Bug Bug
    • Resolution: Works as Designed
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Replication, Sharding
    • None
    • ALL
    • Hide

      I have attached a repro; it prints out the oplogs showing two dropDatabase entries in a row (and no createDatabase) for the affected database.

      Show
      I have attached a repro; it prints out the oplogs showing two dropDatabase entries in a row (and no createDatabase) for the affected database.

      If we run enableSharding and movePrimary on a database, we can cause it to be created (for the purpose of dropDatabase) without a "create" oplog entry. It appears that on the primary shard this does not cause a problem. On a non-primary shard the database will be created on the primary but not the secondary, so if a dropDatabase is run, it will create an oplog entry to delete a database the secondary does not think exists.

        1. server46550_repro.js
          0.7 kB
          Matthew Russotto

            Assignee:
            garaudy.etienne@mongodb.com Garaudy Etienne
            Reporter:
            matthew.russotto@mongodb.com Matthew Russotto
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: