Skip to content

Commit

Permalink
Review adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
Bouncheck committed Oct 8, 2024
1 parent a357efb commit b33da6c
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,7 @@ public enum DefaultDriverOption implements DriverOption {
* <p>Value-type: boolean
*/
CONTROL_CONNECTION_RECONNECT_CONTACT_POINTS(
"advanced.control-connection.reconnection.fallback-to-original-contacts"),
"advanced.control-connection.reconnection.fallback-to-original-contact-points"),

/**
* Whether `Session.prepare` calls should be sent to all nodes in the cluster.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import com.datastax.oss.driver.api.core.auth.AuthenticationException;
import com.datastax.oss.driver.api.core.config.DefaultDriverOption;
import com.datastax.oss.driver.api.core.config.DriverConfig;
import com.datastax.oss.driver.api.core.config.DriverExecutionProfile;
import com.datastax.oss.driver.api.core.connection.ReconnectionPolicy;
import com.datastax.oss.driver.api.core.loadbalancing.NodeDistance;
import com.datastax.oss.driver.api.core.metadata.Node;
Expand Down Expand Up @@ -300,7 +301,10 @@ private void init(
.withOwnerLogPrefix(logPrefix + "|control")
.build();

Queue<Node> nodes = context.getLoadBalancingPolicyWrapper().newQueryPlan();
Queue<Node> nodes =
context
.getLoadBalancingPolicyWrapper()
.newQueryPlan(null, DriverExecutionProfile.DEFAULT_NAME, null);

connect(
nodes,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ public Queue<Node> newQueryPlan() {
@NonNull
public Queue<Node> newControlReconnectionQueryPlan() {
// First try the original way
Queue<Node> regularQueryPlan = newQueryPlan();
Queue<Node> regularQueryPlan = newQueryPlan(null, DriverExecutionProfile.DEFAULT_NAME, null);
if (!regularQueryPlan.isEmpty()) return regularQueryPlan;

if (context
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/resources/reference.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2122,7 +2122,7 @@ datastax-java-driver {
# Required: yes
# Modifiable at runtime: yes, the new value will be used for checks issued after the change.
# Overridable in a profile: no
fallback-to-original-contacts = false
fallback-to-original-contact-points = false
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -353,12 +353,6 @@ public void cannot_reconnect_with_resolved_socket() {
break;
}
}
/*
ResultSet rs = session.execute("SELECT * FROM system.local");
assertThat(rs).isNotNull();
Row row = rs.one();
assertThat(row).isNotNull();
*/
nodes = session.getMetadata().getNodes().values();
assertThat(nodes).hasSize(3);
Iterator<Node> iterator = nodes.iterator();
Expand Down

0 comments on commit b33da6c

Please sign in to comment.