[SERVER-31362] mongos should not return a 'it is already the primary' error because it retries movePrimary on a config PrimarySteppedDown error Created: 03/Oct/17 Updated: 06/Dec/22 Resolved: 10/Oct/17 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | 3.5.13 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Dianna Hohensee (Inactive) | Assignee: | [DO NOT USE] Backlog - Sharding Team |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Assigned Teams: |
Sharding
|
||||||||
| Operating System: | ALL | ||||||||
| Participants: | |||||||||
| Description |
|
The movePrimary command can return a 'it is already the primary' error when the shard it is given to make primary already is the primary. Now that the movePrimary command is running on the config server, the mongos can return this error when it DOES set a new shard primary successfully. This is because the config server can interrupt the movePrimary command with a step down, say after the config.databases write but before waiting for replication is complete. The mongos then gets a PrimarySteppedDown error from the config server and retries the command to find to find the operation already done. This is a new behavior in v3.5 because movePrimary runs on the config server now. |
| Comments |
| Comment by Kaloian Manassiev [ 10/Oct/17 ] |
|
Closing in favour of the solution described in |
| Comment by Dianna Hohensee (Inactive) [ 03/Oct/17 ] |
|
|