Skip to content

Commit 63cb907

Browse files
nikagraabsurdfarceaimurphylukasz-antoniakaratno
authored
chore: merge upstream apache 4.19.4 (#1291)
* [maven-release-plugin] prepare for next development iteration * Removing interface to Travis CI Patch by Bret McGuire; reviewed by Andy Tolbert and Bret McGuire reference: apache#2066 * Replace outdated link in README patch by April Murphy; reviewed by Bret McGuire and Lukasz Antoniak reference: apache#2064 * ninja-fix: Remove ASF donation message * Update LZ4 and Netty dependencies for CVE response The primary goal here is to address CVE-2025-12183. Netty includes a dependency on vulnerable versions of lz4-java, so update to a fixed version of Netty as well. On the C* server side, we opted to move to the new community fork of lz4-java, so match that decision here (CASSANDRA-21052). patch by Abe Ratnofsky; reviewed by Francisco Guerrero for CASSJAVA-113 * Bump logback to most recent Java8-compatible version patch by Bret McGuire; reviewed by Bret McGuire and Lukasz Antoniak reference: apache#2051 * ninja-fix - adding an extra space to render the page correctly with mkdocs I've been looking into details on custom codes and noticed that the there is an issue with rendering bullet points on the following page: https://apache.github.io/cassandra-java-driver/4.19.0/core/custom_codecs/ * ninja-fix Updating a few indented lists that were observed to not render correctly while working on the previous ninja-fix * Re-work ordering clause support in query builder behind a single OrderingClause abstraction. This allows for custom impls to define their own logic for managing "ORDER BY" clauses. patch by Bret McGuire; reviewed by Bret McGuire and Lukasz Antoniak reference: apache#2047 * ninja-fix We apparently had some unformatted files slip in in the last commit * CASSJAVA-122 Fix OSGi LZ4 test patch by Lukasz Antoniak; reviewed by Bret McGuire and Lukasz Antoniak reference: apache#2075 * Bump Jackson to 2.20.1 patch by Bret McGuire: reviewed by Bret McGuire and Lukasz Antoniak reference: apache#2076 * CASSJAVA-108 Update ESRI (and remove org.json) dependencies patch by Bret McGuire; reviewed by Bret McGuire and Lukasz Antoniak reference: apache#2052 * ninja-fix Update Jenkins label to Jammy * Revert "ninja-fix Update Jenkins label to Jammy" This reverts commit de96ce8. * Fix race condition in ClockSeqAndNodeContainer patch by Jason Koch; reviewed by Lukasz Antoniak and Bret McGuire reference: apache#2050 * CASSJAVA-3: Fix ordering of LIMIT and PER PARTITION LIMIT clauses patch by David Stringer; reviewed by Lukasz Antoniak and Bret McGuire reference: apache#2022 * CASSJAVA-30: Update CONTRIBUTING.md patch by Jane He; reviewed by Bret McGuire and Andy Tolbert * CASSJAVA-104: Fix Flaky tests patch by Jane He; review by Bret McGuire and Andy Tolbert * CASSJAVA-109, CASSJAVA-117: Manual and API References after donation, Build CI for Java Driver Doc Patch by Jane He and Łukasz Antoniak; Reviewed by Bret McGuire * [maven-release-plugin] prepare release 4.19.3 * [maven-release-plugin] prepare for next development iteration * Revert "[maven-release-plugin] prepare for next development iteration" This reverts commit 342088c. * Revert "[maven-release-plugin] prepare release 4.19.3" This reverts commit 375e4b5. * Revert apache#2051 and replace it with something closer to the intent of the original PR (apache#1901). The change that was actually merged attempted to bump us up to the most recent Java8-compatible logback impl. This moved us from 1.2.x to 1.3.x which in turn brought some dependency changes that were excessive, especially for a patch release. patch by Bret McGuire; reviewed by Andy Tolbert and Abe Ratnofsky reference: apache#2088 * Add changelog for 4.19.3 * [maven-release-plugin] prepare release 4.19.3 * Revert "[maven-release-plugin] prepare release 4.19.3" This reverts commit 8e2e70c. * [maven-release-plugin] prepare release 4.19.3 * [maven-release-plugin] prepare for next development iteration * Add security-model discoverability (AGENTS.md -> SECURITY.md -> security model) Wires the conventional AGENTS.md -> SECURITY.md -> security model chain so automated tooling can mechanically discover the project's security model. No model content is changed. Generated-by: Claude Opus 4.8 (1M context) patch by Jarek Potiuk; reviewed by Bret McGuire reference: apache#2092 * ninja-fix Fix equality operation for Geometry subclasses * CASSJAVA-131: Add Retention Requirement to Jenkinsfile-asf patch by Jane He; reviewed by Michael Semb Wever * CASSJAVA-136 Ninja fix to correct geometry equality actually broke geometry equality patch by Bret McGuire; reviewed by Jane He * CASSJAVA-137 Bump Netty to 4.1.138 patch by Bret McGuire; reviewed by Andy Tolbert * ninja-fix Changelog entries for 4.19.4 * ninja-fix Update scm entry in root pom.xml to match what was done for 3.x * ninja-fix XML formatting fix for pom.xml * [maven-release-plugin] prepare release 4.19.4 * docs: restore Sphinx link style in merged manual pages Upstream rewrote manual links to mkdocs' dir/README.md form, and the lines without conflicts merged that way. Put them back to our ../dir/ form: the docs hook rewrites both forms and GitHub renders both, so this is source consistency rather than a build requirement. Record the rule in CONTRIBUTING so the next sync does not rediscover it. Upstream's anchor and typo fixes stay. Refs: DRIVER-1126 Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Co-Authored-By: Claude Fable 5.1 <[email protected]> * build: keep the mapper-runtime revapi baseline Upstream 4.19.3 reset its revapi baselines after its release; the other modules kept ours through conflicts, but mapper-runtime merged cleanly and lost its entries. They are DataStax-era ignores (JAVA-2369, JAVA-2633, JAVA-2792), inert against the 4.19.2.3 baseline revapi resolves, so this only keeps the file identical to the line. Refs: DRIVER-1126 Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Co-Authored-By: Claude Fable 5.1 <[email protected]> * docs: fix anchors, nesting and a stale version from the merge Upstream's link to #inflighthandler was dead because the fork had renamed the heading to match its own broken link; restore upstream's heading. Re-indent the custom codecs list so the runtime snippet stays inside its item, and lift the lz4-java example to the pinned version. Refs: DRIVER-1126 Co-Authored-By: Claude Fable 5.1 <[email protected]> * fix: compare geometries by the wrapped ESRI geometry Since 4.19.3 equals() bound to OGCGeometry.equals(Object), which ESRI 1.x does not declare, so an application still on 1.x silently fell back to identity comparison. Compare what that method compares, the wrapped com.esri.core.geometry.Geometry and the spatial reference, through API both 1.x and 2.x have; hashCode() already hashes the geometry. The upgrade note no longer needs the 2.2.4 requirement. Refs: DRIVER-1126 Co-Authored-By: Claude Fable 5.1 <[email protected]> * test: restore the OSGi bundle provisioning the merge broke Two slips in BundleOptions. The shaded guava bundle kept the org.apache.cassandra groupId from #895, which versionAsInProject() cannot resolve through our dependencies.properties. The 4.19.3 merge resolved the lz4Bundle() conflict to our side and dropped upstream's CASSJAVA-122 sun.misc extension bundle, which lz4-java imports. Every Osgi*IT is @ignore'd and no lane runs them (#1293), so neither showed. Refs: DRIVER-1126 Co-Authored-By: Claude Fable 5.1 <[email protected]> * test: drop the prepared-cache retention the merge made redundant Upstream 4.19.3 moved weakValues() from the protected constructor's base builder into the public constructor's decorator, so a subclass that passes its own decorator now gets a strong cache. Our TestCqlPrepareAsyncProcessor only retained the cached futures to stop them being collected mid-test. Take upstream's comment, drop the retention set and the process() override, and require the removal event again instead of checking it only when present. Refs: DRIVER-1126 Co-Authored-By: Claude Fable 5.1 <[email protected]> * docs: correct the ordering javadoc taken from upstream Select.orderBy() still promises to append to the current list, but since the OrderingClause rework an ANN ordering is replaced instead, and orderByAnnOf() replaces any column ordering; say so. ANN stands for approximate, not adjacent, nearest neighbor. Refs: DRIVER-1126 Co-Authored-By: Claude Fable 5.1 <[email protected]> * docs: drop fork entries from the upstream changelog changelog/README.md tracks upstream releases only. The 4.19.2.3 section came in with feature PRs; the same changes are described in the upgrade guide and the GitHub release notes. Refs: DRIVER-1126 Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * build: bump version to 4.19.4.0-SNAPSHOT The line now carries upstream 4.19.4, so the next fork release restarts the fourth component at 4.19.4.0, as 4.19.2.0 did after the 4.19.2 sync. Refs: DRIVER-1126 Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * test: await the prepared-cache removal event Guava lowers the cache size before it calls the removal listener, so the size wait alone left the removed-query-id assertion racing the event. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix: keep ANN ordering on an empty orderByIds map The ordering-clause rework made orderByIds(emptyMap) replace an ANN ordering with nothing; 4.19.2.x kept it. Document the map overloads' replace behaviour and fix a typo in CqlPrepareAsyncProcessor. Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: absurdfarce <[email protected]> Co-authored-by: April I. Murphy <[email protected]> Co-authored-by: Lukasz Antoniak <[email protected]> Co-authored-by: Abe Ratnofsky <[email protected]> Co-authored-by: absurdfarce <[email protected]> Co-authored-by: Mikhail Laptev <[email protected]> Co-authored-by: jasonk000 <[email protected]> Co-authored-by: David Stringer <[email protected]> Co-authored-by: janehe <[email protected]> Co-authored-by: janehe <[email protected]> Co-authored-by: Abe Ratnofsky <[email protected]> Co-authored-by: Abe Ratnofsky <[email protected]> Co-authored-by: Jarek Potiuk <[email protected]> Co-authored-by: Jane He <[email protected]> Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
1 parent 25ae672 commit 63cb907

60 files changed

Lines changed: 601 additions & 290 deletions

File tree

Some content is hidden

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

‎CONTRIBUTING.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -625,6 +625,11 @@ instead of replaying commits that are already merged.
625625
line. To pick up later changes, merge the line into the pull request branch; don't rebase it,
626626
and don't squash review fixups. These pull requests are the exception to the rebase, squash and
627627
"don't push a merge commit" rules above.
628+
* Upstream's docs build is mkdocs and writes manual links as `dir/README.md`; ours is Sphinx and
629+
writes them as `../dir/` with `#fragment` anchors. Lines that merge without conflict take
630+
upstream's form and nothing catches it: the docs hook rewrites both forms and GitHub renders
631+
both. After the merge put them back so the sources stay in one form;
632+
`git grep -n '](.*README\.md' manual upgrade_guide faq` must print nothing.
628633
* The line's ruleset requires linear history. Once CI is green, a repository admin or maintainer
629634
merges the pull request with **Create a merge commit**, ticking "Merge without waiting for
630635
requirements to be met (bypass rules)". Leave the rule enabled.

‎bom/pom.xml‎

Lines changed: 10 additions & 10 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.19.2.4-SNAPSHOT</version>
31+
<version>4.19.4.0-SNAPSHOT</version>
3232
</parent>
3333
<artifactId>java-driver-bom</artifactId>
3434
<packaging>pom</packaging>
@@ -38,47 +38,47 @@
3838
<dependency>
3939
<groupId>com.scylladb</groupId>
4040
<artifactId>java-driver-core</artifactId>
41-
<version>4.19.2.4-SNAPSHOT</version>
41+
<version>4.19.4.0-SNAPSHOT</version>
4242
</dependency>
4343
<dependency>
4444
<groupId>com.scylladb</groupId>
4545
<artifactId>java-driver-core-shaded</artifactId>
46-
<version>4.19.2.4-SNAPSHOT</version>
46+
<version>4.19.4.0-SNAPSHOT</version>
4747
</dependency>
4848
<dependency>
4949
<groupId>com.scylladb</groupId>
5050
<artifactId>java-driver-mapper-processor</artifactId>
51-
<version>4.19.2.4-SNAPSHOT</version>
51+
<version>4.19.4.0-SNAPSHOT</version>
5252
</dependency>
5353
<dependency>
5454
<groupId>com.scylladb</groupId>
5555
<artifactId>java-driver-mapper-runtime</artifactId>
56-
<version>4.19.2.4-SNAPSHOT</version>
56+
<version>4.19.4.0-SNAPSHOT</version>
5757
</dependency>
5858
<dependency>
5959
<groupId>com.scylladb</groupId>
6060
<artifactId>java-driver-query-builder</artifactId>
61-
<version>4.19.2.4-SNAPSHOT</version>
61+
<version>4.19.4.0-SNAPSHOT</version>
6262
</dependency>
6363
<dependency>
6464
<groupId>com.scylladb</groupId>
6565
<artifactId>java-driver-guava-shaded</artifactId>
66-
<version>4.19.2.4-SNAPSHOT</version>
66+
<version>4.19.4.0-SNAPSHOT</version>
6767
</dependency>
6868
<dependency>
6969
<groupId>com.scylladb</groupId>
7070
<artifactId>java-driver-test-infra</artifactId>
71-
<version>4.19.2.4-SNAPSHOT</version>
71+
<version>4.19.4.0-SNAPSHOT</version>
7272
</dependency>
7373
<dependency>
7474
<groupId>com.scylladb</groupId>
7575
<artifactId>java-driver-metrics-micrometer</artifactId>
76-
<version>4.19.2.4-SNAPSHOT</version>
76+
<version>4.19.4.0-SNAPSHOT</version>
7777
</dependency>
7878
<dependency>
7979
<groupId>com.scylladb</groupId>
8080
<artifactId>java-driver-metrics-microprofile</artifactId>
81-
<version>4.19.2.4-SNAPSHOT</version>
81+
<version>4.19.4.0-SNAPSHOT</version>
8282
</dependency>
8383
<dependency>
8484
<groupId>com.scylladb</groupId>

‎changelog/README.md‎

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,20 @@ under the License.
2121

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

24-
### 4.19.2.3
25-
26-
- [bug] Escape string literals in function, keyspace, and index metadata descriptions, and handle
27-
function bodies containing single quotes and dollar-quote delimiters in schema builders (#1238)
28-
- [breaking] Remove DSE Graph execution support and TinkerPop integration (#1028). Restore
29-
deprecated Graph API stubs; Graph construction and execution throw
30-
`UnsupportedOperationException` with migration guidance.
31-
- [breaking] Remove DSE geometry and DateRange codec support (#1029). Retain deprecated geometry
32-
and DateRange value types for local operations, with the optional ESRI dependency for geometry.
33-
`DseDataTypes` and `DseTypeCodecs` retain compatibility signatures; DSE codec operations throw
34-
`UnsupportedOperationException`.
35-
- [breaking] Remove DSE metadata and schema runtime support; public metadata and query-builder APIs
36-
remain as deprecated compatibility shells. DSE connections are unsupported (#1031, #1238)
24+
### 4.19.4
25+
26+
- [improvement] CASSJAVA-137: Bump Netty to 4.1.138
27+
- [bug] CASSJAVA-136: Ninja fix to correct geometry equality actually broke geometry equality
28+
29+
### 4.19.3
30+
31+
- [bug] CASSJAVA-3: Fix ordering of LIMIT and PER PARTITION LIMIT clauses
32+
- [bug] PR 2050: Fix race condition in ClockSeqAndNodeContainer
33+
- [improvement] CASSJAVA-108: Update ESRI (and remove org.json) dependencies
34+
- [improvement] PR 2076: Bump Jackson to 2.20.1
35+
- [improvement] PR 2047: Re-work ordering clause support in query builder
36+
- [improvement] PR 2051: Bump logback to 1.3.15, slf4j to 2.0.16
37+
- [improvement] CASSJAVA-113: Bump LZ4 to 1.10.1, Netty to 4.1.130.Final
3738

3839
### 4.19.2
3940

‎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.19.2.4-SNAPSHOT</version>
31+
<version>4.19.4.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.19.2.4-SNAPSHOT</version>
31+
<version>4.19.4.0-SNAPSHOT</version>
3232
</parent>
3333
<artifactId>java-driver-core</artifactId>
3434
<packaging>bundle</packaging>

‎core/src/main/java/com/datastax/dse/driver/internal/core/data/geometry/DefaultGeometry.java‎

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
import java.io.ObjectInputStream;
3131
import java.io.Serializable;
3232
import java.nio.ByteBuffer;
33+
import java.util.Objects;
3334
import net.jcip.annotations.Immutable;
3435

3536
@Immutable
@@ -176,16 +177,17 @@ public boolean equals(Object o) {
176177
return false;
177178
}
178179
DefaultGeometry that = (DefaultGeometry) o;
179-
return this.getOgcGeometry().equals(that.getOgcGeometry());
180+
// Compare what OGCGeometry.equals(Object) compares in ESRI 2.x, the wrapped
181+
// com.esri.core.geometry.Geometry and the spatial reference, through methods ESRI 1.x also
182+
// has; 1.x lacks equals(Object), so binding to it would fall back to identity there.
183+
return getEsriGeometry().equals(that.getEsriGeometry())
184+
&& Objects.equals(
185+
getOgcGeometry().getEsriSpatialReference(),
186+
that.getOgcGeometry().getEsriSpatialReference());
180187
}
181188

182189
@Override
183190
public int hashCode() {
184-
// OGCGeometry subclasses do not overwrite Object.hashCode()
185-
// while com.esri.core.geometry.Geometry subclasses usually do,
186-
// so use these instead; this is consistent with equals
187-
// because OGCGeometry.equals() actually compare between
188-
// com.esri.core.geometry.Geometry objects
189191
return getEsriGeometry().hashCode();
190192
}
191193

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1169,8 +1169,8 @@ public enum DefaultDriverOption implements DriverOption {
11691169
* }
11701170
* </pre>
11711171
*
1172-
* Note: subnets must be represented as prefix blocks, see {@code
1173-
* inet.ipaddr.Address#isPrefixBlock()}.
1172+
* Note: subnets must be represented as prefix blocks, see <a
1173+
* href="https://seancfoley.github.io/IPAddress/ipaddress.html#parsing-addresses-with-prefix-length">inet.ipaddr.Address.isPrefixBlock()</a>
11741174
*
11751175
* <p>Value type: {@link java.util.Map Map}&#60;{@link String},{@link String}&#62;
11761176
*/

‎core/src/main/java/com/datastax/oss/driver/api/core/data/CqlVector.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public static <V> CqlVector<V> newInstance(List<V> list) {
8080
* Create a new CqlVector instance from the specified string representation.
8181
*
8282
* @param str a String representation of a CqlVector
83-
* @param subtypeCodec the codec used to parse individual vector elements
83+
* @param subtypeCodec the codec to use to parse the individual elements
8484
* @return a new CqlVector built from the String representation
8585
*/
8686
public static <V> CqlVector<V> from(@NonNull String str, @NonNull TypeCodec<V> subtypeCodec) {

‎core/src/main/java/com/datastax/oss/driver/api/core/uuid/Uuids.java‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,9 +142,8 @@ private long get() {
142142
if (!initialized) {
143143
synchronized (ClockSeqAndNodeContainer.class) {
144144
if (!initialized) {
145-
146-
initialized = true;
147145
val = makeClockSeqAndNode();
146+
initialized = true;
148147
}
149148
}
150149
}

‎core/src/main/java/com/datastax/oss/driver/internal/core/cql/CqlPrepareAsyncProcessor.java‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
import com.datastax.oss.driver.internal.core.session.RequestProcessor;
3535
import com.datastax.oss.driver.internal.core.util.concurrent.CompletableFutures;
3636
import com.datastax.oss.driver.internal.core.util.concurrent.RunOrSchedule;
37-
import com.datastax.oss.driver.shaded.guava.common.base.Functions;
3837
import com.datastax.oss.driver.shaded.guava.common.cache.Cache;
3938
import com.datastax.oss.driver.shaded.guava.common.cache.CacheBuilder;
4039
import com.datastax.oss.driver.shaded.guava.common.collect.Iterables;
@@ -64,14 +63,15 @@ public CqlPrepareAsyncProcessor() {
6463
}
6564

6665
public CqlPrepareAsyncProcessor(@NonNull Optional<? extends DefaultDriverContext> context) {
67-
this(context, Functions.identity());
66+
// Use weakValues to evict prepared statements from the cache as soon as they are
67+
// no longer referenced elsewhere.
68+
this(context, CacheBuilder::weakValues);
6869
}
6970

7071
protected CqlPrepareAsyncProcessor(
7172
Optional<? extends DefaultDriverContext> context,
7273
Function<CacheBuilder<Object, Object>, CacheBuilder<Object, Object>> decorator) {
73-
74-
CacheBuilder<Object, Object> baseCache = CacheBuilder.newBuilder().weakValues();
74+
CacheBuilder<Object, Object> baseCache = CacheBuilder.newBuilder();
7575
this.cache = decorator.apply(baseCache).build();
7676
context.ifPresent(
7777
(ctx) -> {

0 commit comments

Comments
 (0)