Upgrade Cassandra gocql dependency
Description
Upgrade Cassandra driver dependency from the legacy github.com/gocql/gocql module to the Apache-maintained GoCQL driver, github.com/apache/cassandra-gocql-driver/v2.
This would align Cadence with the actively maintained Apache Cassandra Go driver and allow us to validate newer driver behavior, including Cassandra native protocol v5 support, updated type handling, and ongoing upstream fixes.
Suggested validation scope
- Run Cassandra persistence unit tests.
- Run live Cassandra integration tests with
CASSANDRA_PROTO_VERSION=4. - Run live Cassandra integration tests with
CASSANDRA_PROTO_VERSION=5. - Recent GoCQL releases introduce several breaking and deprecated APIs, so the migration needs compatibility work rather than a simple version bump
- Validate workflow execution, shard, matching, queue, domain, visibility, and history persistence paths.
- Pay attention to UDT decoding /
MapScanbehavior, task list partition config decoding, and shard read/write semantics.
The goal is to capture the required work, validation plan, and blockers so the migration can be done safely when the dependency and internal readiness align.
Is this a breaking change?
- [x] Yes
- [ ] No
If yes, explain why: The underlying driver upgrade may involve breaking/deprecated changes. It should be treated as a high-risk persistence-layer update and validated carefully against real Cassandra before release.
Scope of the feature (server, specific client, all clients)
Server
Thanks for making this issue!
We need to ensure that this change supports v1 (github.com/gocql/gocql) and v2 (github.com/apache/cassandra-gocql-driver/v2) for a period of time as customers migrate - which just means that using both drivers can conform to the existing interface https://github.com/cadence-workflow/cadence/blob/f7789e54abf135550742b93181162653ae490298/common/persistence/nosql/nosqlplugin/cassandra/gocql/interface.go#L42-L47 and can be injected in the same way as this https://github.com/cadence-workflow/cadence/blob/f7789e54abf135550742b93181162653ae490298/common/persistence/nosql/nosqlplugin/cassandra/gocql/public/client.go#L33-L48.
We should test both versions of the gocql plugin w/ integration tests.