[JAVA-438] Block writes when "not master" occurs Created: 26/Sep/11  Updated: 03/Apr/14  Resolved: 04/Dec/13

Status: Closed
Project: Java Driver
Component/s: Performance
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Scott Hernandez (Inactive) Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates JAVA-786 Make driver more proactive about sett... Closed
Related

 Description   

When any "safe" write, or read, happens which results in a "not master" error on the primary pool all writes should be blocked until the new master is found.



 Comments   
Comment by Jeffrey Yemin [ 12/Jul/13 ]

I think https://github.com/mongodb/mongo-java-driver/blob/3.0.x/driver/src/main/org/mongodb/connection/impl/DefaultCluster.java#L81 basically does what you're asking for in the 3.0.x branch. The blocking won't be triggered by a "not master" error, but rather the close of the socket (since an election will close all the sockets anyway...).

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