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

shardCollection gets DuplicateKeyError if it retries inserting to config.collections after failing to wait for writeConcern

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major - P3 Major - P3
    • None
    • 3.6.2, 3.7.1
    • Sharding
    • ALL
    • v3.6
    • Sharding 2018-11-19
    • 5

    Description

      This write done by _configsvrShardCollection to write the collection entry to the sharding catalog uses majority writeConcern and the kIdempotent RetryPolicy.

      If it fails to wait for writeConcern, it will be retried because of the kIdempotent policy, and the retry will see DuplicateKeyError because the document has already been written locally.

      Attachments

        Activity

          People

            randolph@mongodb.com Randolph Tan
            esha.maharishi@mongodb.com Esha Maharishi (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: