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

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

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Major - P3 Major - P3
    • None
    • None
    • Sharding
    • Sharding
    • ALL

    Description

      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.

      Attachments

        Activity

          People

            backlog-server-sharding [DO NOT USE] Backlog - Sharding Team
            spencer@mongodb.com Spencer Brody (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: