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

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 3.6.2, 3.7.1
    • Component/s: Sharding
    • ALL
    • v3.6
    • Sharding 2018-11-19
    • 5

      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.

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

              Created:
              Updated:
              Resolved: