[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:
Related
related to SERVER-31008 Make trying to move the primary shard... Closed
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 SERVER-31008.

Comment by Dianna Hohensee (Inactive) [ 03/Oct/17 ]

SERVER-31008 proposes a different solution, of making movePrimary return OK when the shard specified is already the primary shard. This ticket and SERVER-31008 propose different solutions for the identical problem.

Generated at Thu Feb 08 04:26:47 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.