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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Duplicate
    • Affects Version/s: 3.6.2, 3.7.1
    • Fix Version/s: None
    • Component/s: Sharding
    • Operating System:
      ALL
    • Backport Requested:
      v3.6
    • Sprint:
      Sharding 2018-11-19
    • Linked BF Score:
      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

          Issue Links

            Activity

              People

              Assignee:
              renctan Randolph Tan
              Reporter:
              esha.maharishi Esha Maharishi
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: