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

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor - P4
    • Resolution: Duplicate
    • Affects Version/s: 2.1.0
    • Fix Version/s: None
    • Component/s: Sharding
    • Labels:
      None

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: