doanduyhai / Achilles

An advanced Java Object Mapper/Query DSL generator for Cassandra
http://achilles.archinnov.info
Apache License 2.0
241 stars 92 forks source link

Configurable protocol version #374

Closed hjizettle closed 3 years ago

hjizettle commented 3 years ago

Currently the internal code creating the sessions used in the embedded cassandra instance looks like this:

Cluster cluster = Cluster.builder()
                .addContactPoint(host)
                .withPort(cqlPort)
                .withClusterName(clusterName)
                .withCompression(compression)
                .withLoadBalancingPolicy(loadBalancingPolicy)
                .withRetryPolicy(retryPolicy)
                .withReconnectionPolicy(reconnectionPolicy)
                .withProtocolVersion(ProtocolVersion.NEWEST_SUPPORTED)
                .withSocketOptions(socketOptions)
                .withoutJMXReporting()
                .build();

This breaks us when upgrading to driver 3.11.0 since the newest supported version is changed to V5. I think it was a harsh move in a minor version bump but it is what it is.

Would it be possible to expose this property via the CassandraEmbeddedServerBuilder?

hjizettle commented 3 years ago

I created a tiny patch for this but it would be great if it could be backported to previously still released versions @doanduyhai

doanduyhai commented 3 years ago

Thank you @hjizettle for the patch

I'll do a release this week-end to include your patch

Regards