-
Type: New Feature
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
Add support to control how operations are handled when slave_ok is used. Extend the connection to include two pools of ports; one for the master node and one for non-master nodes. Create a configuration option to allow using non-master nodes for non-write operations (queries basically).
Maybe something like this:
class QueryOptions {
boolean masterOnly = true;
String[] excludedReplicas = null;
String[] includedReplicas = null;
}
By setting excluded/includedReplicas you can filter certain replicas in/out of the pools. By default the master will be only server used; this keeps compatibility with the existing driver.
- depends on
-
JAVA-144 Support slave-ok on queries
- Closed