-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
4.x: Add optional fallback for ControlConnection#reconnect()
#341
4.x: Add optional fallback for ControlConnection#reconnect()
#341
Conversation
5213e1a
to
57245e1
Compare
3134093
to
1ebd326
Compare
ControlConnection#reconnect()
1ebd326
to
8b9cd3d
Compare
8b9cd3d
to
88ed886
Compare
88ed886
to
c5bffec
Compare
@Bouncheck , I have been thinking about this solution, more I think less I like it. |
ControlConnection#reconnect()
ControlConnection#reconnect()
integration-tests/src/test/java/com/datastax/oss/driver/core/resolver/MockResolverIT.java
Outdated
Show resolved
Hide resolved
core/src/main/java/com/datastax/oss/driver/api/core/config/DefaultDriverOption.java
Outdated
Show resolved
Hide resolved
integration-tests/src/test/java/com/datastax/oss/driver/core/resolver/MockResolverIT.java
Outdated
Show resolved
Hide resolved
...src/main/java/com/datastax/oss/driver/internal/core/metadata/LoadBalancingPolicyWrapper.java
Outdated
Show resolved
Hide resolved
@Bouncheck , I see that you still use
|
Regarding this, I have tried to do it, unfortunately due to the API this fix will be extremely intrusive, let's go ahead with your solution. |
Yes, but it's during the initialization. I believe that part works fine. |
It works fine, but creates unnecessary confusion. |
Adds a method for testing the issues that surface after cluster replacements. Due to the variable, sometimes long runtime it is not added to any of the test groups.
b33da6c
to
be5f5f8
Compare
I reverted that 1 call in ControlConnection init back to |
I can adjust them, but I don't know if it's worth it |
5e4ca90
to
d2fcb14
Compare
Please check last commit and tell if you are ok with it. |
Adds an experimental option to allow `ControlConnection` to try reconnecting to the original contact points held by `MetadataManager`, in case of getting empty query plan from the load balancing policy. In order to separate this logic from query plans of other queries `LoadBalancingPolicyWrapper#newControlReconnectionQueryPlan()` was introduced and is called during reconnection in place of `newQueryPlan()`.
e88d7f1
to
2b280a2
Compare
Adds additional config option that changes behavior of ControlConnection's reconnection. In case LBP returns an empty query plan we will attempt to connect to the original endpoints regardless of their last observed status.
The option is by default disabled and driver without enabling it should keep behaving the same way as before.
If enabled it should be possible to reconnect to the cluster if all endpoints containing hostnames were lost during normal operation and then cluster was replaced.