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

config.system.sessions collection can end up with invalid chunks if it is dropped and re-sharded with a shard key other than _id

    • Fully Compatible
    • ALL
    • v4.4, v4.2, v4.0, v3.6
    • Sharding 2021-09-20, Sharding 2021-10-04, Sharding 2021-10-18
    • 85

      The balancer assumes that the sessions collection is always sharded by _id. So the split points it uses are always computed based on _id.id. So if a the sessions collection is dropped, and re-sharded with a shard key other than _id, the balancer will end up creating invalid chunks (the _configsvrCommitChunkSplit command does not verify that the requested split points have the expected shard key pattern). This issue exists in 3.6, 4.0, 4.2 and 4.4 since prior to SERVER-35804 users are not banned from dropping collections in the config database.

      We can solve this by doing one of the following:

            jonathan.lee@mongodb.com Jonathan Lee
            cheahuychou.mao@mongodb.com Cheahuychou Mao
            0 Vote for this issue
            4 Start watching this issue