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

Accept DuplicateKey as a possible error in resharding_nonblocking_coordinator_rebuild.js

    • Fully Compatible
    • v5.1, v5.0
    • Sharding 2021-11-29
    • 163
    • 1

      The resharding_nonblocking_coordinator_rebuild.js test intentionally triggers elections on the config server replica set. It also steps up the resharding operation to abort to work around a limitation of the data consistency checks in the ReshardingTest fixture. However, the primary shard of the database will retry the _configsvrReshardCollection command on retryable errors and can lead there to be a second resharding operation after the first. (In the cases where the resharding succeeded this second invocation would have been a no-op from the requested shard key matching the newly set one.) The second resharding operation ends up failing with a DuplicateKey because the conflicting documents end up being cloned by the ReshardingCollectionCloner rather than applied by the ReshardingOplogApplier. The DuplicateKey error is acceptable for the purposes of this test because it still indicates the recipient was able to update its state in config.reshardingOperations on the config server primary to "applying" without blocking replication.

            Assignee:
            max.hirschhorn@mongodb.com Max Hirschhorn
            Reporter:
            max.hirschhorn@mongodb.com Max Hirschhorn
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: