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

Enabling sharding creates a database without an oplog entry

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Works as Designed
    • None
    • None
    • 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.

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: