HiveBrain v1.2.0
Get Started
← Back to all entries
patternMinor

What does Java driver v3.0+ "partially compatible" with Cassandra 4.0 mean?

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
whatwithmeancompatiblejavapartiallydoesdrivercassandra

Problem

We are planning to upgrade our Cassandra 3.0.14 to Cassandra 4.1.1 and we're checking the compatibility of our current Java SDK version(3.3.0) with Cassandra 4.1.1.

I have tested it with our current implementation and there doesn't seem to be any issues.

Based on this link: https://docs.datastax.com/en/driver-matrix/docs/java-drivers.html,
what does "Partially compatible" mean for Cassandra driver version 3.0+ to Apache Cassandra 4?

Solution

The "partial compatibility" for earlier versions of the Java driver meant that although the older versions could connect to Cassandra 4.x clusters, those drivers were limited to Cassandra 3.x and 2.2 API, specifically the native CQL binary protocol v4.

CQL native protocol v5 was added in Cassandra 4.0 (CASSANDRA-9362). From the driver perspective, the main changes compared to v4 are the ability to specify the keyspace per query and improved handling of prepared statements.

It is important to note that native protocol v5 was in beta support for a while (CASSANDRA-12142) and the beta status was not lifted until Java driver v4.11.0 (JAVA-2704).

Java driver v4 is NOT binary-compatible with Java driver v3 so you will need to refactor your application if you decide to upgrade.

For the most part, the improvements for native protocol v5 have not been implemented yet (CASSANDRA-18478) so you should be fine to continue using v3.x of the Java driver. However, Java driver v3.3.0 was released 6 years ago so we recommend that you upgrade to the latest 3.x patch release which at the time of writing is Java driver v3.11. Cheers!

Context

StackExchange Database Administrators Q#328530, answer score: 4

Revisions (0)

No revisions yet.