All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- gocql now refreshes the entire ring when it receives a topology change event and when control connection is re-connected. This simplifies code managing ring state. (#1680)
- Supported versions of Cassandra that we test against are now 4.0.x and 4.1.x. (#1685)
- Default HostDialer now uses already-resolved connect address instead of hostname when establishing TCP connections (#1683).
- Deadlock in Session.Close(). (#1688)
- Race between Query.Release() and speculative executions (#1684)
- Missed ring update during control connection reconnection (#1680)
- Supported versions of Go that we test against are now Go 1.19 and Go 1.20.
- Node event handling now processes topology events before status events. This fixes some cases where new nodes were missed. (#1682)
- Learning a new IP address for an existing node (identified by host ID) now triggers replacement of that host. This fixes some Kubernetes reconnection failures. (#1682)
- Refresh ring when processing a node UP event for an unknown host. This fixes some cases where new nodes were missed. (#1669)
- Panic in RackAwareRoundRobinPolicy caused by wrong alignment on 32-bit platforms. (#1666)
- Added a RackAwareRoundRobinPolicy that attempts to keep client->server traffic in the same rack when possible.
- Supported versions of Go that we test against are now Go 1.18 and Go 1.19.
- GetCustomPayload now returns nil instead of panicking in case of query error. (#1385)
- Nil pointer dereference in events.go when handling node removal. (#1652)
- Reading peers from DataStax Enterprise clusters. This was a regression in 1.2.0. (#1646)
- Unmarshaling maps did not pre-allocate the map. (#1642)
This release improves support for connecting through proxies and some improvements when using Cassandra 4.0 or later.
- HostDialer interface now allows customizing connection including TLS setup per host. (#1629)
- The driver now uses
host_id
instead of connect address to identify nodes. (#1632) - gocql reads
system.peers_v2
instead ofsystem.peers
when connected to Cassandra 4.0 or later and populatesHostInfo.Port
using the native port. (#1635)
- Data race in
HostInfo.HostnameAndPort()
. (#1631) - Handling of nils when marshaling/unmarshaling lists and maps. (#1630)
- Silent data corruption in case a map was serialized into UDT and some fields in the UDT were not present in the map. The driver now correctly writes nulls instead of shifting fields. (#1626, #1639)
- Changelog.
- StreamObserver and StreamObserverContext interfaces to allow observing CQL streams.
- ClusterConfig.WriteTimeout option now allows to specify a write-timeout different from read-timeout.
- TypeInfo.NewWithError method.
- Supported versions of Go that we test against are now Go 1.17 and Go 1.18.
- The driver now returns an error if SetWriteDeadline fails. If you need to run gocql on a platform that does not support SetWriteDeadline, set WriteTimeout to zero to disable the timeout.
- Creating streams on a connection that is closing now fails early.
- HostFilter now also applies to control connections.
- TokenAwareHostPolicy now panics immediately during initialization instead of at random point later if you reuse the TokenAwareHostPolicy between multiple sessions. Reusing TokenAwareHostPolicy between sessions was never supported.
- The driver no longer resets the network connection if a write fails with non-network-related error.
- Blocked network write to a network could block other goroutines, this is now fixed.
- Fixed panic in unmarshalUDT when trying to unmarshal a user-defined-type to a non-pointer Go type.
- Fixed panic when trying to unmarshal unknown/custom CQL type.
- TypeInfo.New, please use TypeInfo.NewWithError instead.
- Started tagging versions with semantic version tags