Skip to content

Merge upstream apache/cassandra-java-driver 4.19.2 and bump version to 4.19.2.0#895

Draft
nikagra wants to merge 76 commits into
scylladb:scylla-4.xfrom
nikagra:scylla-4.x-merge-4.19.2
Draft

Merge upstream apache/cassandra-java-driver 4.19.2 and bump version to 4.19.2.0#895
nikagra wants to merge 76 commits into
scylladb:scylla-4.xfrom
nikagra:scylla-4.x-merge-4.19.2

Conversation

@nikagra
Copy link
Copy Markdown

@nikagra nikagra commented May 18, 2026

Closes #894

Summary

Merges changes from apache/cassandra-java-driver tag 4.19.2 into scylla-4.x and bumps the ScyllaDB driver version to 4.19.2.0-SNAPSHOT.

The last upstream merge was at Apache tag 4.19.0 (PR #467).

Upstream changes (4.19.0 → 4.19.2)

4.19.0 → 4.19.1

  • CASSJAVA-80 — Support configuration to disable DNS reverse-lookups for SAN validation
  • CASSJAVA-90 — Update native-protocol version
  • CASSJAVA-40 — Driver testing against Java 21
  • CASSJAVA-102 — Fix revapi spurious complaints about optional dependencies
  • CASSJAVA-97 — Let users inject an ID for each request and write to the custom payload
  • CASSJAVA-92 — Local DC provided for nodetool clientstats
  • CASSJAVA-89 — Support schema options that changed in Cassandra 5.0
  • Upgrade Netty to 4.1.119
  • Add SubnetAddressTranslator for IP translation on private networks
  • Remove unnecessary locking in DefaultNettyOptions
  • Eliminate lock in ConcurrencyLimitingRequestThrottler

4.19.1 → 4.19.2

  • CASSJAVA-116 — Retry or Speculative Execution with RequestIdGenerator throws "Duplicate Key"

Conflict resolution notes

  • Removed Apache-specific infrastructure files: .asf.yaml, Jenkinsfile-datastax, Jenkinsfile-asf, ci/create-user.sh, ci/run-tests.sh
  • Kept ScyllaDB groupId (com.scylladb) and removed <parent>org.apache/apache</parent>
  • Kept ScyllaDB's more up-to-date library versions (netty, jackson, etc.)
  • Took upstream's lock-free ConcurrencyLimitingRequestThrottler implementation
  • Kept ScyllaDB's shard-aware channel logic in CqlRequestHandler
  • Kept BackendType.SCYLLA and ScyllaDB-specific test infrastructure
  • Kept ScyllaDB's CCM/Scylla version handling in CcmBridge

lukasz-antoniak and others added 30 commits June 3, 2024 13:48
patch by Lukasz Antoniak; reviewed by Andy Tolbert, and Bret McGuire for CASSANDRA-19635
patch by Lukasz Antoniak; reviewed by Bret McGuire for CASSANDRA-19635
Those repeated calls account for a non-negligible portion of my application
CPU (0.6%) and can definitly be a final field so that it gets resolved only
once per CqlRequestHandler.

patch by Benoit Tellier; reviewed by Andy Tolbert, and Bret McGuire
reference: apache#1623
patch by Stefan Miklosovic; reviewed by Michael Semb Wever for CASSANDRA-19854
DefaultBoundStatement#getRoutingKey has logic to infer the
routing key when no one has explicitly called setRoutingKey
or otherwise set the routing key on the statement.
It however doesn't check for cases where nothing has been
bound yet on the statement.
This causes more problems if the user decides to get a
BoundStatementBuilder from the PreparedStatement, set some
fields on it, and then copy it by constructing new
BoundStatementBuilder objects with the BoundStatement as a
parameter, since the empty ByteBuffer gets copied to all
bound statements, resulting in all requests being targeted
to the same Cassandra node in a token-aware load balancing
policy.

patch by Ammar Khaku; reviewed by Andy Tolbert, and Bret McGuire
reference: apache#1620
…ted future

patch by Lukasz Antoniak; reviewed by Andy Tolbert, and Bret McGuire for JAVA-3167
patch by Lukasz Antoniak; reviewed by Bret McGuire
reference: apache#1955
…allow subsequent tests to run

patch by Henry Hughes; reviewed by Alexandre Dutra and Andy Tolbert for JAVA-3117
patch by Lukasz Antoniak; reviewed by Andy Tolbert and Chris Lohfink for JAVA-3149
patch by Lukasz Antoniak; reviewed by Bret McGuire
reference: apache#1939
It might take some (small) time for callback handling when the
throttler request proceeds to submission.

Before this change, the throttler proceed request will happen while
holding the lock, preventing other tasks from proceeding when there is
spare capacity and even preventing tasks from enqueuing until the
callback completes.

By tracking the expected outcome, we can perform the callback outside
of the lock. This means that request registration and submission can
proceed even when a long callback is being processed.

patch by Jason Koch; Reviewed by Andy Tolbert and Chris Lohfink for CASSANDRA-19922
…kReturnValue

Since the driver's default implementation is for
BatchStatement and SimpleStatement methods to be immutable,
we should annotate those methods with @CheckReturnValue.
Statement#setNowInSeconds implementations are immutable so
annotate that too.

patch by Ammar Khaku; reviewed by Andy Tolbert and Bret McGuire
reference: apache#1607
patch by Bret McGuire; reviewed by Andy Tolbert and Alexandre Dutra
reference: apache#1962
after exceeding max orphan ids

patch by Christian Aistleitner; reviewed by Andy Tolbert, and Bret McGuire for apache#1938
 patch by Siyao (Jane) He; reviewed by Mick Semb Wever for CASSANDRA-19832
patch by Lukasz Antoniak; reviewed by Bret McGuire and Chris Lohfink
patch by Abe Ratnofsky; reviewed by Andy Tolbert and Chris Lohfink for CASSANDRA-20001
patch by Bret McGuire; reviewed by Bret McGuire and Andy Tolbert for CASSANDRA-19930
If super.after() throws an Exception `CURRENT` flag is never dropped
which leads next tests to fail with IllegalStateException("Attempting to use a Ccm rule while another is in use.  This is disallowed")

Patch by Dmitry Kropachev; reviewed by Andy Tolbert and Bret McGuire for JAVA-3117
patch by Jane He; reviewed by Alexandre Dutra and Bret McGuire for JAVA-3051
 patch by Siyao (Jane) He; reviewed by Mick Semb Wever for CASSJAVA-25
… with DataStax HCD 1.0.0

patch by Lukasz Antoniak; reviewed by Bret McGuire
reference: apache#1958
patch by Stefan Miklosovic; reviewed by Bret McGuire for CASSJAVA-2
…assandra versions.

patch by Bret McGuire; reviewed by Bret McGuire for CASSJAVA-54
Updating the link to Jira.

Previously we had a component in the CASSANDRA Jira project but now we have a project for each driver - in the case of Java, it's CASSJAVA.

Added CASSJAVA to .asf.yaml

patch by Jeremy Hanna; reviewed by Bret McGuire for CASSJAVA-61
patch by Lukasz Antoniak; reviewed by Alexandre Dutra and Bret McGuire for CASSJAVA-52
patch by Ammar Khaku; reviewed by Andy Tolbert and Bret McGuire
reference: apache#1635
With some sysprops enabled this will actually be respected which completely borks Astra routing.

patch by Bret McGuire; reviewed by Alexandre Dutra and Bret McGuire for CASSJAVA-55
alexsa and others added 19 commits June 13, 2025 13:22
…ate network based on its subnet mask

patch by Alex Sasnouskikh; reviewed by Bret McGuire and Andy Tolbert
reference: apache#2013
patch by Abe Ratnofsky; reviewed by Bret McGuire for CASSJAVA-102
patch by Jane He; reviewed by Bret McGuire and Alexandre Dutra
This value is initialized at constructor time and marked final, so it
can never change. There is no need to have access to this reference
synchronized.

Patch by Jason Koch; reviewed by Alexandre Dutra, Andy Tolbert and Jane He
Patch by Michael Karsten; reviewed by Abe Ratnofsky and Andy Tolbert for CASSJAVA-89
Following from 6d3ba47 this changes the throttler to a complete
lock-free implementation. Update the related comments and README now
that it is lock-free.

Patch by Jason Koch; reviewed by Alexandre Dutra and Andy Tolbert
patch by Ivan Sopov; reviewed by Bret McGuire
reference: apache#2049
patch by Kefu Chai; reviewed by Andy Tolbert and Bret McGuire
reference: apache#1940
patch by Lukasz Antoniak; reviewed by Bret McGuire and Abe Ratnofsky for CASSJAVA-92
… custom payload

patch by Jane He; reviewed by Abe Ratnofsky and Bret McGuire for CASSJAVA-97
patch by Bret McGuire; reviewed by Andy Tolbert
…throws "Duplicate Key"

patch by Jane He; reviewed by Andy Tolbert and Lukasz Atoniak for CASSJAVA-116
patch by Bret McGuire; reviewed by Lukasz Antoniak and Andy Tolbert
reference: apache#2062
…thub.com/apache/cassandra-java-driver into scylla-4.x-merge-4.19.2

Following conflict resolutions and additional changes were made:
- Removed Apache-specific infrastructure files: .asf.yaml, Jenkinsfile-datastax,
  Jenkinsfile-asf, ci/create-user.sh, ci/run-tests.sh
- Kept ScyllaDB groupId (com.scylladb) and version (4.19.0.10-SNAPSHOT) in pom.xml files
- Kept ScyllaDB's more up-to-date library versions (netty, jackson, etc.)
- Removed <parent>org.apache/apache</parent> from root pom.xml
- Took upstream's lock-free ConcurrencyLimitingRequestThrottler implementation
- Took upstream's CASSJAVA-80: SSL_ALLOW_DNS_REVERSE_LOOKUP_SAN config option
- Took upstream's CASSJAVA-92: local DC in nodetool clientstats
- Took upstream's CASSJAVA-97: RequestIdGenerator support
- Took upstream's CASSJAVA-89: schema options for Cassandra 5.0
- Took upstream's SubnetAddressTranslator
- Kept ScyllaDB's shard-aware channel logic in CqlRequestHandler
- Kept BackendType.SCYLLA and ScyllaDB-specific test infrastructure
- Kept ScyllaDB's CCM/Scylla version handling in CcmBridge
- Kept ScyllaDB's README and documentation
@nikagra nikagra marked this pull request as draft May 18, 2026 21:44
@nikagra nikagra force-pushed the scylla-4.x-merge-4.19.2 branch 8 times, most recently from bdfb230 to 7dd4f55 Compare May 19, 2026 17:16
- BasicLoadBalancingPolicy: add missing closing brace for getLocalRack()
- DefaultLoadBalancingPolicy: remove unused ThreadLocalRandom import
- OptionalLocalDcHelper: add missing LinkedHashSet import; restore correct
  checkLocalDatacenterCompatibility implementation from upstream
- InitialNodeListRefresh: add missing Set import; add contactPoints field
  and constructor arg; restore upstream compute() logic
- InitialNodeListRefreshTest: replace bad merge artifact with upstream
  4.19.2 version (contactPoint1/contactPoint2 setup + ImmutableSet args)
- CqlRequestHandler: rename logPrefix -> handlerLogPrefix in sendRequest()
  calls to session.getChannel()
- manual/core/README.md: add request_id/* to toctree
@nikagra nikagra force-pushed the scylla-4.x-merge-4.19.2 branch from 7dd4f55 to 7d42eee Compare May 19, 2026 17:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Merge upstream apache/cassandra-java-driver 4.19.2 and bump version to 4.19.2.0