[CSHARP-200] Connecting to a replica set with slaveOk=true should return as soon as primary is found Created: 12/Apr/11 Updated: 02/Apr/15 Resolved: 20/Apr/11 |
|
| Status: | Closed |
| Project: | C# Driver |
| Component/s: | Feature Request |
| Affects Version/s: | 1.0 |
| Fix Version/s: | 1.1 |
| Type: | New Feature | Priority: | Major - P3 |
| Reporter: | Robert Stam | Assignee: | Robert Stam |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
| Description |
|
When connecting to a replica set with slaveOk=true the C# driver currently waits for responses from all servers before returning. This can cause a long delay if any of the secondaries is off line or responding slowly. Instead, Connect should return as soon as the primary is found. At that point it may or may not know about any of the secondaries yet. As further responses from other secondaries come in they should be added to the list of known secondaries. This is not a problem with slaveOk=false, as in that case it is already returning as soon as the primary is found. |
| Comments |
| Comment by Robert Stam [ 20/Apr/11 ] |
|
Substantial refactoring of how replica sets are handled (see new MongoServerInstance class and other changes). |
| Comment by Robert Stam [ 20/Apr/11 ] |
|
Thanks for the patch. I was already well in to a refactoring of how replica sets are handled, so I was not able to use the patch directly, but it was helpful to see what you had done. |
| Comment by Miguel Pilar [ 15/Apr/11 ] |
|
Boredom induced patch to address this feature request. |