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

XMLWordPrintableJSON

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

      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 Tan
            Reporter:
            Esha Maharishi (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: