ConfigsvrCoordinators initial checkpoint may incur in DuplicateKey error

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 6.0.0-rc9, 6.1.0-rc0
    • Affects Version/s: 6.0.0-rc0
    • Component/s: Sharding
    • None
    • Fully Compatible
    • ALL
    • v6.0
    • Sharding EMEA 2022-05-30, Sharding EMEA 2022-06-13
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      ConfigsvrCoordinators (such as SetUserWriteBlockModeCoordinator and SetClusterParameterCoordinator) call insert a coordinator state document to initially checkpoint the operation on disk. Since the write is using a concern with timeout, it could happen the following:

      1. Coordinator starts and tries to insert the document
      2. The document is locally written but not yet majority committed
      3. The write concern timeout is hit
      4. The coordinator retries
      5. The retry fails because the document had already been inserted so a DuplicateKey error is thrown

              Assignee:
              Silvia Surroca
              Reporter:
              Jordi Serra Torrens
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: