[CSHARP-303] MongoServer.Primary.IsPrimary = false Created: 12/Aug/11  Updated: 02/Apr/15  Resolved: 12/Sep/11

Status: Closed
Project: C# Driver
Component/s: None
Affects Version/s: 1.2
Fix Version/s: 1.2

Type: Bug Priority: Minor - P4
Reporter: Aristarkh Zagorodnikov Assignee: Robert Stam
Resolution: Done Votes: 0
Labels: driver, replication
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

After primary steps down and client reconnects, the MongoServer.Primary still points to old primary (that, interestingly, already has IsPrimary set to false). MongoServer.Secondaries properly contains all servers and secondaries.
I wonder if MongoServer.Primary should just return null when there are no primaries after one goes down? I'm not sure how it can become NOT null afterwards though, but then I don't know that much about the driver innards.



 Comments   
Comment by Robert Stam [ 12/Sep/11 ]

Once a MongoServerInstance is determined to no longer be the primary the Primary property of MongoServer will be set to null until the new primary is found.

Generated at Wed Feb 07 21:36:26 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.