[JAVA-931] Invalidate existing primaries whenever a primary is detected Created: 18/Aug/13  Updated: 03/Apr/14  Resolved: 07/Nov/13

Status: Closed
Project: Java Driver
Component/s: Cluster Management
Affects Version/s: None
Fix Version/s: 2.12.0, 3.0.0

Type: Improvement Priority: Major - P3
Reporter: Jeffrey Yemin Assignee: Jeffrey Yemin
Resolution: Done Votes: 0
Labels: None
Σ Remaining Estimate: Not Specified Remaining Estimate: Not Specified
Σ Time Spent: Not Specified Time Spent: Not Specified
Σ Original Estimate: Not Specified Original Estimate: Not Specified

Sub-Tasks:
Key
Summary
Type
Status
Assignee
JAVA-1000 2.12: Invalidate existing primaries w... Sub-task Closed Jeffrey Yemin  
JAVA-1001 3.0: Invalidate existing primaries wh... Sub-task Closed Jeffrey Yemin  

 Description   

When connected to a replica set, the driver maintains a list of all the servers in the replica set, with information about each gleaned from the isMaster command. During a failover, depending on timing, the driver could end up with two primaries in this list. The driver should detect and correct this incorrect state by invalidating and attempting to reconnect with any existing primaries in the list whenever a new primary responds to isMaster.



 Comments   
Comment by auto [ 23/Aug/13 ]

Author:

{u'username': u'jyemin', u'name': u'Jeff Yemin', u'email': u'jeff.yemin@10gen.com'}

Message: JAVA-930, JAVA-931: Refactored DiscoveringCluster and tests. Improved test coverage.
DiscoveringCluster now detects Mixed (i.e. misconfigured) cluster types and throws from getServer if detected.
DiscoveringCluster now invalidates any existing primaries in a replica set whenever a primary sends a notification.
Branch: 3.0.x
https://github.com/mongodb/mongo-java-driver/commit/0abfb7246c43bb74da4ba5552d3ecd18b46c3cec

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