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

Databases are created on a shard node even if it's in draining state

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Gone away
    • Affects Version/s: 2.6.3
    • Fix Version/s: None
    • Component/s: Sharding
    • Operating System:
      ALL
    • Steps To Reproduce:
      Hide
      • Create a 3 shard set, sh1, sh2, sh3
      • Start a mongos & config server
      • Connect to mongos
      • Create 4 DBs and insert data. Note that the DBs are created in a round-robin fashion across the shard nodes, i.e.,
        • sh1 - db1& db4
        • sh2 - db2
        • sh3 - db3
      • Remove sh2: db.adminCommand( { removeShard: "sh2" } )
        • The state will go to "draining", but will not complete because the primary database(s) must be moved (movePrimary) or dropped
      • Create another DB and insert data
      • Run the db.adminCommand( { removeShard: "sh2" } ) command
        • The new DB is now created on this shard node
        • Note same will happen if using mongorestore
      Show
      Create a 3 shard set, sh1, sh2, sh3 Start a mongos & config server Connect to mongos Create 4 DBs and insert data. Note that the DBs are created in a round-robin fashion across the shard nodes, i.e., sh1 - db1& db4 sh2 - db2 sh3 - db3 Remove sh2: db.adminCommand( { removeShard: "sh2" } ) The state will go to "draining", but will not complete because the primary database(s) must be moved (movePrimary) or dropped Create another DB and insert data Run the db.adminCommand( { removeShard: "sh2" } ) command The new DB is now created on this shard node Note same will happen if using mongorestore

      Description

      A node in a shard set can have a DB created on it, even if it's been set to a draining state (from removeShard).

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              backlog-server-sharding Backlog - Sharding Team
              Reporter:
              jonathan.abrahams Jonathan Abrahams
              Participants:
              Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: