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

shardCollection might succesfully write to the config server but end up with missing indexes on the primary Shard

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.4.5
    • Affects Version/s: 4.4.4
    • Component/s: Sharding
    • None
    • Fully Compatible
    • ALL
    • Hide

      1. The shard index is created locally
      2. The writes to config.chunks and config.collections are sent to the config server
      3. A stepdown happens
      4. The index creation is rolled backed

      Show
      1. The shard index is created locally 2. The writes to config.chunks and config.collections are sent to the config server 3. A stepdown happens 4. The index creation is rolled backed
    • Sharding 2021-03-22, Sharding 2021-04-05

      The index creation on the shard collection path is performed using a DBClient, which does not wait for majority write concern. The following scenario might happen:

      1. The shard index is created locally
      2. The writes to config.chunks and config.collections are sent to the config server
      3. A stepdown happens
      4. The index creation is rolled backed

      If the write on step two succeeds then we'll end up with a sharded collection without the sharded index created on the primary. We should wait for majority write concern of the latest write after the index creation (probably using the same as the sharding catalog manager)

            Assignee:
            marcos.grillo@mongodb.com Marcos José Grillo Ramirez
            Reporter:
            marcos.grillo@mongodb.com Marcos José Grillo Ramirez
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: