[SERVER-61607] Accept DuplicateKey as a possible error in resharding_nonblocking_coordinator_rebuild.js Created: 18/Nov/21  Updated: 29/Oct/23  Resolved: 20/Nov/21

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 5.2.0, 5.0.5, 5.1.1

Type: Task Priority: Major - P3
Reporter: Max Hirschhorn Assignee: Max Hirschhorn
Resolution: Fixed Votes: 0
Labels: sharding-nyc-subteam1, sharding-wfbf-day
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Related
related to SERVER-61985 resharding_coordinator_recovers_abort... Closed
is related to SERVER-61482 Updates to config.reshardingOperation... Closed
Backwards Compatibility: Fully Compatible
Backport Requested:
v5.1, v5.0
Sprint: Sharding 2021-11-29
Participants:
Linked BF Score: 163
Story Points: 1

 Description   

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.



 Comments   
Comment by Githook User [ 20/Nov/21 ]

Author:

{'name': 'Max Hirschhorn', 'email': 'max.hirschhorn@mongodb.com', 'username': 'visemet'}

Message: SERVER-61607 Add DuplicateKey as acceptable error in resharding test.

(cherry picked from commit 57877f14e139e08d60558f3e70f320e33b7d4079)
Branch: v5.0
https://github.com/mongodb/mongo/commit/22e97a06c9927c4cb1b72871cfb833a5c70d859d

Comment by Githook User [ 20/Nov/21 ]

Author:

{'name': 'Max Hirschhorn', 'email': 'max.hirschhorn@mongodb.com', 'username': 'visemet'}

Message: SERVER-61607 Add DuplicateKey as acceptable error in resharding test.

(cherry picked from commit 57877f14e139e08d60558f3e70f320e33b7d4079)
Branch: v5.1
https://github.com/mongodb/mongo/commit/30741fdf18baf6e75c16ad8b52d6d77c090c173f

Comment by Githook User [ 19/Nov/21 ]

Author:

{'name': 'Max Hirschhorn', 'email': 'max.hirschhorn@mongodb.com', 'username': 'visemet'}

Message: SERVER-61607 Add DuplicateKey as acceptable error in resharding test.
Branch: master
https://github.com/mongodb/mongo/commit/57877f14e139e08d60558f3e70f320e33b7d4079

Generated at Thu Feb 08 05:52:52 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.