addShard upserts discovered databases without locking, this could change a databases primary out from under it

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Won't Fix
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Sharding
    • Sharding
    • ALL
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      During addShard we find any databases that already exist on the shard being added and attempt to add them to the cluster. Before we do that, we check that no databases that exist on the shard already exist on the cluster. There is no locking during these checks, however, so it's possible that a database could be created after the check and assigned to a different shard. If that happens, when we upsert the database document for the database discovered on the shard, we might wind up changing the 'primary' shard for that database out from under it, leading to data loss.

            Assignee:
            [DO NOT USE] Backlog - Sharding Team
            Reporter:
            Spencer Brody (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: