[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: |
|
||||||||||||||||||||
| 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: (cherry picked from commit 57877f14e139e08d60558f3e70f320e33b7d4079) |
| Comment by Githook User [ 20/Nov/21 ] |
|
Author: {'name': 'Max Hirschhorn', 'email': 'max.hirschhorn@mongodb.com', 'username': 'visemet'}Message: (cherry picked from commit 57877f14e139e08d60558f3e70f320e33b7d4079) |
| Comment by Githook User [ 19/Nov/21 ] |
|
Author: {'name': 'Max Hirschhorn', 'email': 'max.hirschhorn@mongodb.com', 'username': 'visemet'}Message: |