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

Better user feedback when drop command was not executed successfully on all shards

    • Type: Icon: Improvement Improvement
    • Resolution: Duplicate
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: 2.1.0
    • Component/s: Sharding
    • None
    • Sharding

      If a drop database fails on some of the shards (for example, when one of the shards was temporarily unreachable), the chunk collection does not get cleaned up properly. The error message does not indicate which of the shards were successfully dropped either:

      { "errmsg" : "exception: socket exception", "code" : 11002, "ok" : 0 }
      

      This will create a state where some of the shards still have the collection while others don't. Currently, mongos will stop right away and will not try proceeding to dropping the database on other shards. If the unreachable shard gets back again and you re-enable sharding + shard the collection, mongos would complain that the collection is already sharded. And querying stuff the belongs to the previously downed shards would give you the correct result.

      Proposal:
      Give user more useful feedback on which shards where able to successfully drop (or unsuccessful) so the user can have the necessary information in the case he/she wants to intervene manually.

      Also consider cleaning the config information if at least one of the shards was able to successfully perform the drop.

            Assignee:
            backlog-server-sharding [DO NOT USE] Backlog - Sharding Team
            Reporter:
            randolph@mongodb.com Randolph Tan
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: