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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 4.4.4
    • Fix Version/s: 4.4.5
    • Component/s: Sharding
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Steps To Reproduce:
      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
    • Sprint:
      Sharding 2021-03-22, Sharding 2021-04-05

      Description

      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)

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved: