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

Prevent config.system.sessions from being created as sharded with its chunk on the config server

    • Type: Icon: Task Task
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 8.1.0-rc0, 8.0.0
    • Component/s: None
    • None
    • Catalog and Routing

      The config.system.sessions collection has special logic to send the shardCollection command to the first shard rather than the dbPrimary since we do not want the collection to live on the config server (as we have an assumption that the config server does not contain chunks or data when it is not embedded).

      However, there is a race condition with transitionToDedicated where the shardCollection command is sent to the config server (because the config server is also the first shard) but before the coordinator is instantiated the config server transitions to dedicated. In this case, the coordinator will still be executed on the config server after the transition completes and will end up creating the collection with a single chunk on the config server.

      In this situation, the collection will never be balanced (since the config server is not considered for balancing) and if the user transitions back to embedded, we will drop the sessions collection locally on the config server resulting in broken metadata for the collection.

            Assignee:
            Unassigned Unassigned
            Reporter:
            allison.easton@mongodb.com Allison Easton
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: