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

Balancer tries to move chunks for non existing ns

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 2.2.2
    • Component/s: Sharding
    • None
    • ALL
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      In our cluster the balancer spends a fair amount of time trying to move around chunks for a database that doesn't exist any longer.

      The database name is "aggregate":

      exception: Dropping collection failed on the following hosts:
      set1/mongo1.domain.net:27019: { errmsg: \"ns not found\", ok: 0.0 },
      set2/mongo2.domain.net:27019: { errmsg: \"ns not found\", ok: 0.0 }
      

      in the config DB:

      mongos> db.databases.find({"_id": /aggregate/})
      { "_id" : "aggregate_2", "partitioned" : false, "primary" : "shard0001" }
      

      Note that aggregate_2 is a different database - the point is that the database "aggregate" is not present

      mongos> db.chunks.find({"ns": /aggregate\./}).count()
      2271
      

      Just to be sure, no chunks associated with aggregate_2:

      mongos> db.chunks.find({"ns": /aggregate_2/}).count()
      0
      

      I am not sure how we could end up in this situation but I would like to find a way out, is it safe to just delete all chunks in config.chunks associated with the "aggregate" ns?

      mongoDB version 2.2.2

            Assignee:
            ramon.fernandez@mongodb.com Ramon Fernandez Marina
            Reporter:
            simone@recordedfuture.com Simone Sciarrati
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: