[SERVER-23559] Primary Member selection is not appropriate - the node having less data becomes primary Created: 06/Apr/16 Updated: 15/Nov/21 Resolved: 31/May/16 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Replication |
| Affects Version/s: | 3.0.4 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Aayushi Mangal | Assignee: | Kelsey Schubert |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Operating System: | ALL |
| Steps To Reproduce: | Mentioned above |
| Participants: |
| Description |
|
Hello Team, I am not sure this comes in which category either in bug or improvement or something else. Version: 3.0.4 I have a three-member replica set with 1 primary and 2 secondaries: A - Primary After some time I introduced 2 secondaries, B and C. Now again for some reason, secondaries were removed and rejoined in cluster. Then I have stepdown node A to make node C primary. Now it seems to be abnormal: Node A: Node B: Node C: ------------------------------- Node B becomes primary and now application is showing "No data found error" B becomes primary after failover, I made Node A primary manually. |
| Comments |
| Comment by Aayushi Mangal [ 25/May/16 ] |
|
Hello Fernandez, The issue has been resolved, I have did this: Stepdown the primary, The only concern I have earlier was how this situation happens so that we Thank you for your response. On Tue, May 24, 2016 at 10:47 PM, Ramon Fernandez (JIRA) <jira@mongodb.org> |
| Comment by Ramon Fernandez Marina [ 24/May/16 ] |
|
aayushi, please have a look at replSetGetStatus(). Please not that in order to investigate if there's a bug in MongoDB we need the logs that Thomas requested above. If you're interested in pursuing this issue please upload the complete logs for all replica set members. Thanks, |
| Comment by Aayushi Mangal [ 06/Apr/16 ] |
|
Thanks Thomas for the revert, would you please let me know how to check for recent optime for the replicaset member. |
| Comment by Kelsey Schubert [ 06/Apr/16 ] |
|
Hi aayushi, A replica set member should not become primary unless it has the most recent optime of any visible member. To continue to investigate this issue, can you please upload the complete logs for each of the replica set members? Thank you, |