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

ConfigsvrCoordinators initial checkpoint may incur in DuplicateKey error

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

      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@mongodb.com Silvia Surroca
            Reporter:
            jordi.serra-torrens@mongodb.com Jordi Serra Torrens
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: