com.datastax.oss
diff --git a/changelog/README.md b/changelog/README.md
index 2d859526586..02c88680e49 100644
--- a/changelog/README.md
+++ b/changelog/README.md
@@ -21,6 +21,26 @@ under the License.
+### 4.18.1
+
+- [improvement] JAVA-3142: Ability to specify ordering of remote local dc's via new configuration for graceful automatic failovers
+- [bug] CASSANDRA-19457: Object reference in Micrometer metrics prevent GC from reclaiming Session instances
+- [improvement] CASSANDRA-19468: Don't swallow exception during metadata refresh
+- [bug] CASSANDRA-19333: Fix data corruption in VectorCodec when using heap buffers
+- [improvement] CASSANDRA-19290: Replace uses of AttributeKey.newInstance
+- [improvement] CASSANDRA-19352: Support native_transport_(address|port) + native_transport_port_ssl for DSE 6.8 (4.x edition)
+- [improvement] CASSANDRA-19180: Support reloading keystore in cassandra-java-driver
+
+### 4.18.0
+
+- [improvement] PR 1689: Add support for publishing percentile time series for the histogram metrics (nparaddi-walmart)
+- [improvement] JAVA-3104: Do not eagerly pre-allocate array when deserializing CqlVector
+- [improvement] JAVA-3111: upgrade jackson-databind to 2.13.4.2 to address gradle dependency issue
+- [improvement] PR 1617: Improve ByteBufPrimitiveCodec readBytes (chibenwa)
+- [improvement] JAVA-3095: Fix CREATE keyword in vector search example in upgrade guide
+- [improvement] JAVA-3100: Update jackson-databind to 2.13.4.1 and jackson-jaxrs-json-provider to 2.13.4 to address recent CVEs
+- [improvement] JAVA-3089: Forbid wildcard imports
+
### 4.17.0
- [improvement] JAVA-3070: Make CqlVector and CqlDuration serializable
diff --git a/core-shaded/pom.xml b/core-shaded/pom.xml
index 389c2144f78..20789e02458 100644
--- a/core-shaded/pom.xml
+++ b/core-shaded/pom.xml
@@ -28,7 +28,7 @@
com.scylladb
java-driver-parent
- 4.18.0.2-SNAPSHOT
+ 4.18.1.0
java-driver-core-shaded
Java driver for Scylla and Apache Cassandra(R) - core with shaded deps
diff --git a/core/pom.xml b/core/pom.xml
index 0f6d8647e22..228730e1142 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -28,7 +28,7 @@
com.scylladb
java-driver-parent
- 4.18.0.2-SNAPSHOT
+ 4.18.1.0
java-driver-core
bundle
diff --git a/core/src/main/java/com/datastax/oss/driver/api/core/config/DefaultDriverOption.java b/core/src/main/java/com/datastax/oss/driver/api/core/config/DefaultDriverOption.java
index 55e8d53dc66..224ed3b11bd 100644
--- a/core/src/main/java/com/datastax/oss/driver/api/core/config/DefaultDriverOption.java
+++ b/core/src/main/java/com/datastax/oss/driver/api/core/config/DefaultDriverOption.java
@@ -982,7 +982,19 @@ public enum DefaultDriverOption implements DriverOption {
* Value-type: boolean
*/
METRICS_GENERATE_AGGREGABLE_HISTOGRAMS("advanced.metrics.histograms.generate-aggregable"),
- ;
+ /**
+ * The duration between attempts to reload the keystore.
+ *
+ *
Value-type: {@link java.time.Duration}
+ */
+ SSL_KEYSTORE_RELOAD_INTERVAL("advanced.ssl-engine-factory.keystore-reload-interval"),
+ /**
+ * Ordered preference list of remote dcs optionally supplied for automatic failover.
+ *
+ *
Value type: {@link java.util.List List}<{@link String}>
+ */
+ LOAD_BALANCING_DC_FAILOVER_PREFERRED_REMOTE_DCS(
+ "advanced.load-balancing-policy.dc-failover.preferred-remote-dcs");
private final String path;
diff --git a/core/src/main/java/com/datastax/oss/driver/api/core/config/OptionsMap.java b/core/src/main/java/com/datastax/oss/driver/api/core/config/OptionsMap.java
index 8906e1dd349..98faf3e590c 100644
--- a/core/src/main/java/com/datastax/oss/driver/api/core/config/OptionsMap.java
+++ b/core/src/main/java/com/datastax/oss/driver/api/core/config/OptionsMap.java
@@ -381,6 +381,8 @@ protected static void fillWithDriverDefaults(OptionsMap map) {
map.put(TypedDriverOption.LOAD_BALANCING_DC_FAILOVER_MAX_NODES_PER_REMOTE_DC, 0);
map.put(TypedDriverOption.LOAD_BALANCING_DC_FAILOVER_ALLOW_FOR_LOCAL_CONSISTENCY_LEVELS, false);
map.put(TypedDriverOption.METRICS_GENERATE_AGGREGABLE_HISTOGRAMS, true);
+ map.put(
+ TypedDriverOption.LOAD_BALANCING_DC_FAILOVER_PREFERRED_REMOTE_DCS, ImmutableList.of(""));
}
@Immutable
diff --git a/core/src/main/java/com/datastax/oss/driver/api/core/config/TypedDriverOption.java b/core/src/main/java/com/datastax/oss/driver/api/core/config/TypedDriverOption.java
index 9be69d0424f..943c8f9fb75 100644
--- a/core/src/main/java/com/datastax/oss/driver/api/core/config/TypedDriverOption.java
+++ b/core/src/main/java/com/datastax/oss/driver/api/core/config/TypedDriverOption.java
@@ -238,6 +238,12 @@ public String toString() {
/** The keystore password. */
public static final TypedDriverOption SSL_KEYSTORE_PASSWORD =
new TypedDriverOption<>(DefaultDriverOption.SSL_KEYSTORE_PASSWORD, GenericType.STRING);
+
+ /** The duration between attempts to reload the keystore. */
+ public static final TypedDriverOption SSL_KEYSTORE_RELOAD_INTERVAL =
+ new TypedDriverOption<>(
+ DefaultDriverOption.SSL_KEYSTORE_RELOAD_INTERVAL, GenericType.DURATION);
+
/** The location of the truststore file. */
public static final TypedDriverOption SSL_TRUSTSTORE_PATH =
new TypedDriverOption<>(DefaultDriverOption.SSL_TRUSTSTORE_PATH, GenericType.STRING);
@@ -889,6 +895,16 @@ public String toString() {
DefaultDriverOption.LOAD_BALANCING_DC_FAILOVER_ALLOW_FOR_LOCAL_CONSISTENCY_LEVELS,
GenericType.BOOLEAN);
+ /**
+ * Ordered preference list of remote dcs optionally supplied for automatic failover and included
+ * in query plan. This feature is enabled only when max-nodes-per-remote-dc is greater than 0.
+ */
+ public static final TypedDriverOption>
+ LOAD_BALANCING_DC_FAILOVER_PREFERRED_REMOTE_DCS =
+ new TypedDriverOption<>(
+ DefaultDriverOption.LOAD_BALANCING_DC_FAILOVER_PREFERRED_REMOTE_DCS,
+ GenericType.listOf(String.class));
+
private static Iterable> introspectBuiltInValues() {
try {
ImmutableList.Builder> result = ImmutableList.builder();
diff --git a/core/src/main/java/com/datastax/oss/driver/internal/core/channel/DriverChannel.java b/core/src/main/java/com/datastax/oss/driver/internal/core/channel/DriverChannel.java
index e1f00a0cd8a..c7913660cbb 100644
--- a/core/src/main/java/com/datastax/oss/driver/internal/core/channel/DriverChannel.java
+++ b/core/src/main/java/com/datastax/oss/driver/internal/core/channel/DriverChannel.java
@@ -58,11 +58,11 @@
@ThreadSafe
public class DriverChannel {
- static final AttributeKey CLUSTER_NAME_KEY = AttributeKey.newInstance("cluster_name");
+ static final AttributeKey CLUSTER_NAME_KEY = AttributeKey.valueOf("cluster_name");
static final AttributeKey