[CDRIVER-93] When connecting directly to a slave node, don't issue an error right away. Created: 19/Aug/11  Updated: 11/Nov/13  Resolved: 11/Nov/13

Status: Closed
Project: C Driver
Component/s: None
Affects Version/s: 0.4
Fix Version/s: 0.90.0

Type: Improvement Priority: Major - P3
Reporter: Kyle Banker Assignee: Gary Murakami
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Issue an error only if trying to write.



 Comments   
Comment by Christian Hergert [ 11/Nov/13 ]

The new C driver[1] can connect to a non-primary just fine without setting an error. The cluster implementation behind the client will determine how to route messages when applicable.

[1] https://github.com/chergert/libmongoc/

Comment by Kyle Banker [ 10/May/12 ]

Update:

We're going to be adding a read_preference setting for the driver. If you attempt to read from a secondary or slave node and your read preference is MONGO_PRIMARY, the read will fail. If it's MONGO_SECONDARY (or some other compatible value), it will succeed.

Comment by Artem [ 05/May/12 ]

"Not recommend" and forbid are different things, aren't they?
There are people using local collections: https://jira.mongodb.org/browse/SERVER-4264

Comment by Kyle Banker [ 23/Jan/12 ]

I don't think we should allow that, since we don't recommend that anyone writes to the local database in general.

Comment by Gifford Hesketh [ 23/Jan/12 ]

What about writing to the "local" db on a slave node ? Does mongo-c-driver support that scenario ?

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