[RELEASE] Java driver 4.8.0

30 views
Skip to first unread message

Olivier Michallat

unread,
Jul 28, 2020, 6:33:27 PM7/28/20
to DataStax Java Driver for Apache Cassandra User Mailing List
We've just released version 4.8.0 of the driver. This minor revision includes a few updates to facilitate the transition from driver 3:

The safe paging state is back. It is a wrapper around the raw bytes returned by Cassandra, that provides an additional level of safety by checking that it's being reused on the right statement. It also has utility methods to convert to a string (or byte array) and back, for example for inclusion as a URL parameter. To access it, use ExecutionInfo.getSafePagingState() instead of getPagingState().

We've also ported the extra type codecs. They allow you to map different Java types to your CQL columns, such as: alternate time types, optionals, enums, JSON strings...
All the new mappings are opt-in: they must be added explicitly to your codec registry. Unlike driver 3, you don't need another dependency: they are available directly from the core module.

We've fixed a discrepancy in the way named setters work: if a placeholder name is reused multiple times in your query string, driver 4 was only setting the first occurrence. It now sets all of them, like driver 3:

PreparedStatement pst = session.prepare("INSERT INTO t (k, v) VALUES (:a, :a)");
// Set both values to 1:
BoundStatement bst = pst.bind().setInt("a", 1);

Finally, we added a few aliases for methods that have a different name than driver 3.

Here's the full changelog:

- [improvement] JAVA-2811: Add aliases for driver 3 method names
- [new feature] JAVA-2808: Provide metrics bindings for Micrometer and MicroProfile
- [new feature] JAVA-2773: Support new protocol v5 message format
- [improvement] JAVA-2841: Raise timeouts during connection initialization
- [bug] JAVA-2331: Unregister old metrics when a node gets removed or changes RPC address
- [improvement] JAVA-2850: Ignore credentials in secure connect bundle [DataStax Astra]
- [improvement] JAVA-2813: Don't fail when secure bundle is specified together with other options
- [bug] JAVA-2800: Exclude SLF4J from mapper-processor dependencies
- [new feature] JAVA-2819: Add DriverConfigLoader.fromString
- [improvement] JAVA-2431: Set all occurrences when bound variables are used multiple times
- [improvement] JAVA-2829: Log protocol negotiation messages at DEBUG level
- [bug] JAVA-2846: Give system properties the highest precedence in DefaultDriverConfigLoader
- [new feature] JAVA-2691: Provide driver 4 support for extra codecs
- [improvement] Allow injection of CodecRegistry on session builder
- [improvement] JAVA-2828: Add safe paging state wrapper
- [bug] JAVA-2835: Correctly handle unresolved addresses in DefaultEndPoint.equals
- [bug] JAVA-2838: Avoid ConcurrentModificationException when closing connection
- [bug] JAVA-2837: make StringCodec strict about unicode in ascii

As usual, the driver is available from Maven central:

<dependency>
  <groupId>com.datastax.oss</groupId>
  <artifactId>java-driver-core</artifactId>
  <version>4.8.0</version>
</dependency>
--
The Java driver team
Reply all
Reply to author
Forward
0 new messages