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

Race between remove shard and access to database may cause NULL pointer crash

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 3.2.0-rc3
    • Component/s: Sharding
    • None
    • Sharding
    • ALL
    • Sharding C (11/20/15), Sharding D (12/11/15), Sharding E (01/08/16)

      ShardRegistry::getShard will return nullptr if the shard id is not found. In the steady state, the metadata should never contain a database which references a removed shard, because we drain the shard first and clear the cached metadata. However, in theory, there is a very narrow race condition where a query might be referencing a database entry, which points to a shard, which was just removed.

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

              Created:
              Updated:
              Resolved: