Skip to content

Commit 60580ab

Browse files
BouncheckmichaelsembweveraratnoBret McGuiretolbertam
authored
Pull changes from 4.18.1 (#440)
* [maven-release-plugin] prepare for next development iteration * Remove distributionManagement, the apache parent defines this for us * Remove fossa dependency analysis github action ASF does not have a subscription for fossa * Remove ASL header from test resource files (that was breaking integration tests) patch by Mick Semb Wever; reviewed by Wei Deng for CASSANDRA-18970 * CASSANDRA-19180: Support reloading keystore in cassandra-java-driver * PR feedback: avoid extra exception wrapping, provide thread naming, improve error messages, etc. * Address PR feedback: reload-interval to use Optional internally and null in config, rather than using sentinel Duration.ZERO * CASSANDRA-19352: Support native_transport_(address|port) + native_transport_port_ssl for DSE 6.8 (4.x edition) patch by absurdfarce; reviewed by absurdfarce and adutra for CASSANDRA-19352 * Replace uses of AttributeKey.newInstance The java driver uses netty channel attributes to decorate a connection's channel with the cluster name (returned from the system.local table) and the map from the OPTIONS response, both of which are obtained on connection initialization. There's an issue here that I wouldn't expect to see in practice in that the AttributeKey's used are created using AttributeKey.newInstance, which throws an exception if an AttributeKey of that name is defined anywhere else in evaluated code. This change attempts to resolve this issue by changing AttributeKey initialiation in DriverChannel from newInstance to valueOf, which avoids throwing an exception if an AttributeKey of the same name was previously instantiated. patch by Andy Tolbert; reviewed by Bret McGuire, Alexandre Dutra, Abe Ratnofsky for CASSANDRA-19290 * Fix data corruption in VectorCodec when using heap buffers patch by Ekaterina Dimitrova; reviewed by Alexandre Dutra and Bret McGuire for CASSANDRA-19333 * CASSANDRA-19504: Improve state management for Java versions in Jenkinsfile patch by Bret McGuire; reviewed by Bret McGuire for CASSANDRA-19504 * Update README.md Typo carried over from old docs, needed closing parenthesis. * Update link to JIRA to ASF instance. Also include information about populating the component field. Patch by Bret McGuire; reviewed by Bret McGuire, Alexandre Dutra * CASSANDRA-19468 Don't swallow exception during metadata refresh If an exception was thrown while getting new metadata as part of schema refresh it died on the admin executor instead of being propagated to the CompletableFuture argument. Instead, catch those exceptions and hand them off to the CompletableFuture. patch by Ammar Khaku; reviewed by Chris Lohfink, Bret McGuire for CASSANDRA-19468 * patch by Jane He; reviewed by Alexandre Dutra and Bret McGuire for CASSANDRA-19457 * Changelog updates to reflect work that went out in 4.18.0 Patch by Bret McGuire; reviewed by Bret McGuire, Alexandre Dutra for PR 1914 * Fixes to get past code formatting issues patch by Bret McGuire; reviewed by Bret McGuire for PR 1928 * Initial fix to unit tests patch by Bret McGuire; reviewed by Bret McGuire for PR 1930 * CASSANDRA-19292: Enable Jenkins to test against Cassandra 4.1.x patch by Bret McGuire; reviewed by Bret McGuire, Alexandre Dutra for CASSANDRA-19292 * JAVA-3142: Ability to specify ordering of remote local dc's via new configuration for graceful automatic failovers patch by Nitin Chhabra; reviewed by Alexandre Dutra, Andy Tolbert, and Bret McGuire for JAVA-3142 * CASSANDRA-19568: Use Jabba to specify Java 1.8 for building the driver patch by Jane He and Bret McGuire; reviewed by Bret McGuire for CASSANDRA-19568 * ninja-fix CASSANDRA-19568: fixing mangled Groovy * ninja-fix updating repo for releases * JAVA-3142: Improving the documentation for remote local dc's feature patch by Nitin Chhabra; reviewed by Bret McGuire for JAVA-3142 * ninja-fix changlog updates for 4.18.1 * [maven-release-plugin] prepare release 4.18.1 * [maven-release-plugin] prepare for next development iteration --------- Co-authored-by: mck <[email protected]> Co-authored-by: Abe Ratnofsky <[email protected]> Co-authored-by: Abe Ratnofsky <[email protected]> Co-authored-by: Bret McGuire <[email protected]> Co-authored-by: Andy Tolbert <[email protected]> Co-authored-by: Ekaterina Dimitrova <[email protected]> Co-authored-by: Emelia <[email protected]> Co-authored-by: Ammar Khaku <[email protected]> Co-authored-by: janehe <[email protected]> Co-authored-by: Nitin Chhabra <[email protected]>
1 parent 4ff678a commit 60580ab

File tree

56 files changed

+1641
-208
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+1641
-208
lines changed

.github/workflows/dep-lic-scan.yaml

Lines changed: 0 additions & 39 deletions
This file was deleted.

Jenkinsfile

Lines changed: 35 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,6 @@ def initializeEnvironment() {
6161
. ${JABBA_SHELL}
6262
jabba which 1.8''', returnStdout: true).trim()
6363

64-
env.TEST_JAVA_HOME = sh(label: 'Get TEST_JAVA_HOME',script: '''#!/bin/bash -le
65-
. ${JABBA_SHELL}
66-
jabba which ${JABBA_VERSION}''', returnStdout: true).trim()
67-
env.TEST_JAVA_VERSION = sh(label: 'Get TEST_JAVA_VERSION',script: '''#!/bin/bash -le
68-
echo "${JABBA_VERSION##*.}"''', returnStdout: true).trim()
69-
7064
sh label: 'Download Apache CassandraⓇ or DataStax Enterprise',script: '''#!/bin/bash -le
7165
. ${JABBA_SHELL}
7266
jabba use 1.8
@@ -104,18 +98,25 @@ ENVIRONMENT_EOF
10498
}
10599

106100
def buildDriver(jabbaVersion) {
107-
withEnv(["BUILD_JABBA_VERSION=${jabbaVersion}"]) {
108-
sh label: 'Build driver', script: '''#!/bin/bash -le
109-
. ${JABBA_SHELL}
110-
jabba use ${BUILD_JABBA_VERSION}
101+
def buildDriverScript = '''#!/bin/bash -le
111102
112-
mvn -B -V install -DskipTests -Dmaven.javadoc.skip=true
113-
'''
114-
}
103+
. ${JABBA_SHELL}
104+
jabba use '''+jabbaVersion+'''
105+
106+
echo "Building with Java version '''+jabbaVersion+'''"
107+
108+
mvn -B -V install -DskipTests -Dmaven.javadoc.skip=true
109+
'''
110+
sh label: 'Build driver', script: buildDriverScript
115111
}
116112

117113
def executeTests() {
118-
sh label: 'Execute tests', script: '''#!/bin/bash -le
114+
def testJavaHome = sh(label: 'Get TEST_JAVA_HOME',script: '''#!/bin/bash -le
115+
. ${JABBA_SHELL}
116+
jabba which ${JABBA_VERSION}''', returnStdout: true).trim()
117+
def testJavaVersion = (JABBA_VERSION =~ /.*\.(\d+)/)[0][1]
118+
119+
def executeTestScript = '''#!/bin/bash -le
119120
# Load CCM environment variables
120121
set -o allexport
121122
. ${HOME}/environment.txt
@@ -137,8 +138,8 @@ def executeTests() {
137138
printenv | sort
138139
139140
mvn -B -V ${INTEGRATION_TESTS_FILTER_ARGUMENT} -T 1 verify \
140-
-Ptest-jdk-${TEST_JAVA_VERSION} \
141-
-DtestJavaHome=${TEST_JAVA_HOME} \
141+
-Ptest-jdk-'''+testJavaVersion+''' \
142+
-DtestJavaHome='''+testJavaHome+''' \
142143
-DfailIfNoTests=false \
143144
-Dmaven.test.failure.ignore=true \
144145
-Dmaven.javadoc.skip=${SKIP_JAVADOCS} \
@@ -149,6 +150,8 @@ def executeTests() {
149150
${ISOLATED_ITS_ARGUMENT} \
150151
${PARALLELIZABLE_ITS_ARGUMENT}
151152
'''
153+
echo "Invoking Maven with parameters test-jdk-${testJavaVersion} and testJavaHome = ${testJavaHome}"
154+
sh label: 'Execute tests', script: executeTestScript
152155
}
153156

154157
def executeCodeCoverage() {
@@ -255,8 +258,10 @@ pipeline {
255258
choices: ['2.1', // Legacy Apache CassandraⓇ
256259
'2.2', // Legacy Apache CassandraⓇ
257260
'3.0', // Previous Apache CassandraⓇ
258-
'3.11', // Current Apache CassandraⓇ
259-
'4.0', // Development Apache CassandraⓇ
261+
'3.11', // Previous Apache CassandraⓇ
262+
'4.0', // Previous Apache CassandraⓇ
263+
'4.1', // Current Apache CassandraⓇ
264+
'5.0', // Development Apache CassandraⓇ
260265
'dse-4.8.16', // Previous EOSL DataStax Enterprise
261266
'dse-5.0.15', // Long Term Support DataStax Enterprise
262267
'dse-5.1.35', // Legacy DataStax Enterprise
@@ -290,7 +295,11 @@ pipeline {
290295
</tr>
291296
<tr>
292297
<td><strong>4.0</strong></td>
293-
<td>Apache Cassandra&reg; v4.x (<b>CURRENTLY UNDER DEVELOPMENT</b>)</td>
298+
<td>Apache Cassandra&reg; v4.0.x</td>
299+
</tr>
300+
<tr>
301+
<td><strong>4.1</strong></td>
302+
<td>Apache Cassandra&reg; v4.1.x</td>
294303
</tr>
295304
<tr>
296305
<td><strong>dse-4.8.16</strong></td>
@@ -444,7 +453,7 @@ pipeline {
444453
axis {
445454
name 'SERVER_VERSION'
446455
values '3.11', // Latest stable Apache CassandraⓇ
447-
'4.0', // Development Apache CassandraⓇ
456+
'4.1', // Development Apache CassandraⓇ
448457
'dse-6.8.30' // Current DataStax Enterprise
449458
}
450459
axis {
@@ -477,7 +486,7 @@ pipeline {
477486
}
478487
stage('Build-Driver') {
479488
steps {
480-
buildDriver('default')
489+
buildDriver('1.8')
481490
}
482491
}
483492
stage('Execute-Tests') {
@@ -553,8 +562,10 @@ pipeline {
553562
name 'SERVER_VERSION'
554563
values '2.1', // Legacy Apache CassandraⓇ
555564
'3.0', // Previous Apache CassandraⓇ
556-
'3.11', // Current Apache CassandraⓇ
557-
'4.0', // Development Apache CassandraⓇ
565+
'3.11', // Previous Apache CassandraⓇ
566+
'4.0', // Previous Apache CassandraⓇ
567+
'4.1', // Current Apache CassandraⓇ
568+
'5.0', // Development Apache CassandraⓇ
558569
'dse-4.8.16', // Previous EOSL DataStax Enterprise
559570
'dse-5.0.15', // Last EOSL DataStax Enterprise
560571
'dse-5.1.35', // Legacy DataStax Enterprise
@@ -591,8 +602,7 @@ pipeline {
591602
}
592603
stage('Build-Driver') {
593604
steps {
594-
// Jabba default should be a JDK8 for now
595-
buildDriver('default')
605+
buildDriver('1.8')
596606
}
597607
}
598608
stage('Execute-Tests') {

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,6 @@ See the [upgrade guide](upgrade_guide/) for details.
6363

6464
* [Manual](manual/)
6565
* [API docs]
66-
* Bug tracking: [JIRA]
67-
* [Mailing list]
6866
* Training: [Scylla University]
6967
* [Changelog]
7068
* [FAQ]

bom/pom.xml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
<parent>
2929
<groupId>com.scylladb</groupId>
3030
<artifactId>java-driver-parent</artifactId>
31-
<version>4.18.0.3-SNAPSHOT</version>
31+
<version>4.18.1.0-SNAPSHOT</version>
3232
</parent>
3333
<artifactId>java-driver-bom</artifactId>
3434
<packaging>pom</packaging>
@@ -38,42 +38,42 @@
3838
<dependency>
3939
<groupId>com.scylladb</groupId>
4040
<artifactId>java-driver-core</artifactId>
41-
<version>4.18.0.3-SNAPSHOT</version>
41+
<version>4.18.1.0-SNAPSHOT</version>
4242
</dependency>
4343
<dependency>
4444
<groupId>com.scylladb</groupId>
4545
<artifactId>java-driver-core-shaded</artifactId>
46-
<version>4.18.0.3-SNAPSHOT</version>
46+
<version>4.18.1.0-SNAPSHOT</version>
4747
</dependency>
4848
<dependency>
4949
<groupId>com.scylladb</groupId>
5050
<artifactId>java-driver-mapper-processor</artifactId>
51-
<version>4.18.0.3-SNAPSHOT</version>
51+
<version>4.18.1.0-SNAPSHOT</version>
5252
</dependency>
5353
<dependency>
5454
<groupId>com.scylladb</groupId>
5555
<artifactId>java-driver-mapper-runtime</artifactId>
56-
<version>4.18.0.3-SNAPSHOT</version>
56+
<version>4.18.1.0-SNAPSHOT</version>
5757
</dependency>
5858
<dependency>
5959
<groupId>com.scylladb</groupId>
6060
<artifactId>java-driver-query-builder</artifactId>
61-
<version>4.18.0.3-SNAPSHOT</version>
61+
<version>4.18.1.0-SNAPSHOT</version>
6262
</dependency>
6363
<dependency>
6464
<groupId>com.scylladb</groupId>
6565
<artifactId>java-driver-test-infra</artifactId>
66-
<version>4.18.0.3-SNAPSHOT</version>
66+
<version>4.18.1.0-SNAPSHOT</version>
6767
</dependency>
6868
<dependency>
6969
<groupId>com.scylladb</groupId>
7070
<artifactId>java-driver-metrics-micrometer</artifactId>
71-
<version>4.18.0.3-SNAPSHOT</version>
71+
<version>4.18.1.0-SNAPSHOT</version>
7272
</dependency>
7373
<dependency>
7474
<groupId>com.scylladb</groupId>
7575
<artifactId>java-driver-metrics-microprofile</artifactId>
76-
<version>4.18.0.3-SNAPSHOT</version>
76+
<version>4.18.1.0-SNAPSHOT</version>
7777
</dependency>
7878
<dependency>
7979
<groupId>com.datastax.oss</groupId>

changelog/README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,26 @@ under the License.
2121

2222
<!-- Note: contrary to 3.x, insert new entries *first* in their section -->
2323

24+
### 4.18.1
25+
26+
- [improvement] JAVA-3142: Ability to specify ordering of remote local dc's via new configuration for graceful automatic failovers
27+
- [bug] CASSANDRA-19457: Object reference in Micrometer metrics prevent GC from reclaiming Session instances
28+
- [improvement] CASSANDRA-19468: Don't swallow exception during metadata refresh
29+
- [bug] CASSANDRA-19333: Fix data corruption in VectorCodec when using heap buffers
30+
- [improvement] CASSANDRA-19290: Replace uses of AttributeKey.newInstance
31+
- [improvement] CASSANDRA-19352: Support native_transport_(address|port) + native_transport_port_ssl for DSE 6.8 (4.x edition)
32+
- [improvement] CASSANDRA-19180: Support reloading keystore in cassandra-java-driver
33+
34+
### 4.18.0
35+
36+
- [improvement] PR 1689: Add support for publishing percentile time series for the histogram metrics (nparaddi-walmart)
37+
- [improvement] JAVA-3104: Do not eagerly pre-allocate array when deserializing CqlVector
38+
- [improvement] JAVA-3111: upgrade jackson-databind to 2.13.4.2 to address gradle dependency issue
39+
- [improvement] PR 1617: Improve ByteBufPrimitiveCodec readBytes (chibenwa)
40+
- [improvement] JAVA-3095: Fix CREATE keyword in vector search example in upgrade guide
41+
- [improvement] JAVA-3100: Update jackson-databind to 2.13.4.1 and jackson-jaxrs-json-provider to 2.13.4 to address recent CVEs
42+
- [improvement] JAVA-3089: Forbid wildcard imports
43+
2444
### 4.17.0
2545

2646
- [improvement] JAVA-3070: Make CqlVector and CqlDuration serializable

core-shaded/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
<parent>
2929
<groupId>com.scylladb</groupId>
3030
<artifactId>java-driver-parent</artifactId>
31-
<version>4.18.0.3-SNAPSHOT</version>
31+
<version>4.18.1.0-SNAPSHOT</version>
3232
</parent>
3333
<artifactId>java-driver-core-shaded</artifactId>
3434
<name>Java driver for Scylla and Apache Cassandra(R) - core with shaded deps</name>

core/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
<parent>
2929
<groupId>com.scylladb</groupId>
3030
<artifactId>java-driver-parent</artifactId>
31-
<version>4.18.0.3-SNAPSHOT</version>
31+
<version>4.18.1.0-SNAPSHOT</version>
3232
</parent>
3333
<artifactId>java-driver-core</artifactId>
3434
<packaging>bundle</packaging>

core/src/main/java/com/datastax/oss/driver/api/core/config/DefaultDriverOption.java

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -997,7 +997,19 @@ public enum DefaultDriverOption implements DriverOption {
997997
* <p>Value-type: boolean
998998
*/
999999
METRICS_GENERATE_AGGREGABLE_HISTOGRAMS("advanced.metrics.histograms.generate-aggregable"),
1000-
;
1000+
/**
1001+
* The duration between attempts to reload the keystore.
1002+
*
1003+
* <p>Value-type: {@link java.time.Duration}
1004+
*/
1005+
SSL_KEYSTORE_RELOAD_INTERVAL("advanced.ssl-engine-factory.keystore-reload-interval"),
1006+
/**
1007+
* Ordered preference list of remote dcs optionally supplied for automatic failover.
1008+
*
1009+
* <p>Value type: {@link java.util.List List}&#60;{@link String}&#62;
1010+
*/
1011+
LOAD_BALANCING_DC_FAILOVER_PREFERRED_REMOTE_DCS(
1012+
"advanced.load-balancing-policy.dc-failover.preferred-remote-dcs");
10011013

10021014
private final String path;
10031015

core/src/main/java/com/datastax/oss/driver/api/core/config/OptionsMap.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,8 @@ protected static void fillWithDriverDefaults(OptionsMap map) {
383383
map.put(TypedDriverOption.LOAD_BALANCING_DC_FAILOVER_MAX_NODES_PER_REMOTE_DC, 0);
384384
map.put(TypedDriverOption.LOAD_BALANCING_DC_FAILOVER_ALLOW_FOR_LOCAL_CONSISTENCY_LEVELS, false);
385385
map.put(TypedDriverOption.METRICS_GENERATE_AGGREGABLE_HISTOGRAMS, true);
386+
map.put(
387+
TypedDriverOption.LOAD_BALANCING_DC_FAILOVER_PREFERRED_REMOTE_DCS, ImmutableList.of(""));
386388
}
387389

388390
@Immutable

core/src/main/java/com/datastax/oss/driver/api/core/config/TypedDriverOption.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,12 @@ public String toString() {
238238
/** The keystore password. */
239239
public static final TypedDriverOption<String> SSL_KEYSTORE_PASSWORD =
240240
new TypedDriverOption<>(DefaultDriverOption.SSL_KEYSTORE_PASSWORD, GenericType.STRING);
241+
242+
/** The duration between attempts to reload the keystore. */
243+
public static final TypedDriverOption<Duration> SSL_KEYSTORE_RELOAD_INTERVAL =
244+
new TypedDriverOption<>(
245+
DefaultDriverOption.SSL_KEYSTORE_RELOAD_INTERVAL, GenericType.DURATION);
246+
241247
/** The location of the truststore file. */
242248
public static final TypedDriverOption<String> SSL_TRUSTSTORE_PATH =
243249
new TypedDriverOption<>(DefaultDriverOption.SSL_TRUSTSTORE_PATH, GenericType.STRING);
@@ -897,6 +903,16 @@ public String toString() {
897903
DefaultDriverOption.LOAD_BALANCING_DC_FAILOVER_ALLOW_FOR_LOCAL_CONSISTENCY_LEVELS,
898904
GenericType.BOOLEAN);
899905

906+
/**
907+
* Ordered preference list of remote dcs optionally supplied for automatic failover and included
908+
* in query plan. This feature is enabled only when max-nodes-per-remote-dc is greater than 0.
909+
*/
910+
public static final TypedDriverOption<List<String>>
911+
LOAD_BALANCING_DC_FAILOVER_PREFERRED_REMOTE_DCS =
912+
new TypedDriverOption<>(
913+
DefaultDriverOption.LOAD_BALANCING_DC_FAILOVER_PREFERRED_REMOTE_DCS,
914+
GenericType.listOf(String.class));
915+
900916
private static Iterable<TypedDriverOption<?>> introspectBuiltInValues() {
901917
try {
902918
ImmutableList.Builder<TypedDriverOption<?>> result = ImmutableList.builder();

0 commit comments

Comments
 (0)