6.0.0
This version is a departure from legacy API design, stemming from the sync version migration. Due to large
performance issues and lack of dynamic topology handling in earlier versions, a decision has been made to cut
the ties and focus on delivering the best functionality without legacy burden. The API surface changes are
quite large, but everyone is encouraged to update - the performance improvements and new features cannot be
understated.
New
- Topology-aware load balancing:
TopologyAwareNodeDistanceEvaluator
andTopologyAwareLoadBalancingStrategy
. - New
ReconnectionPolicy
used when trying to re-establish connections to downed nodes. Error
now implements standardError
.SessionBuilder
introduced as the preferred way to create a session.- Added missing traits for
BatchType
andQueryFlags
. ToString
implementation forSimpleServerEvent
.- Standard trait implementations for event frames.
contains_column
,is_empty_by_name
andis_empty
functions forRow
.Display
implementation for public enums.- Missing traits for
PreparedMetadata
,Value
,Consistency
andColType
. - New
PreparedMetadataFlags
. - New
ClusterMetadata
representing information about a cluster. - Extracted protocol functionality to separate
cassandra-protocol
crate. - Passing final auth data from the server to
SaslAuthenticator
. SpeculativeExecutionPolicy
for speculative execution control.
Changed
- All
with_name
fields or args in the query API are nowbool
instead ofOption<bool>
flags
field removed fromQueryParams
(flags are now derived from the other fields at serialization time)- Rewritten transport layer for massive performance improvements (including removing
bb8
). This
involves changing a large portion of public API related to transport and server events. - Rewritten event mechanism - now you can subscribe to server events via
create_event_receiver()
inSession
. - Replaced
RowsMetadataFlag
,QueryFlags
andframe::Flags
vectors with bitflags. - Changed
Target
andChangeType
enums toSchemaChangeTarget
andSchemaChangeType
. - The
varint
type now usesnum::BigInt
representation (this impliesDecimal
also uses "big" types). - Removed
unstable-dynamic-cluster
feature, since it wasn't working as expected and introduced performance
penalty. Dynamic topology handling is now built-in. - Removed
AsBytes
in favor of newSerialize
trait due to performance penalty. - Removed
FromSingleByte
andAsByte
in favor ofFrom
/TryFrom
. - Removed traits along with
async-trait
dependency:BatchExecutor
,ExecExecutor
,PrepareExecutor
,
QueryExecutor
,GetConnection
andCdrsSession
. Everything is now embedded directly inSession
. - Load balancing strategy now returns query plans, rather than individual nodes, and operates on cluster metadata.
- Removed
SingleNode
load balancing strategy. - Removed empty
SimpleError
. - Renamed
connect_generic_static
toconnect_generic
. - Removed
GetRetryPolicy
. - Renamed
ChangeSchemeOptions
toSchemaChangeOptions
. - Protocol version can now be selected at run time.
Value
now directly contains the value in theSome
variant instead of a separate body field.- Consistent naming convention in all builders.
- Split protocol-level parameters from high-level statement parameters (
QueryParams
vsStatementParams
) and
simplified API. add_query_prepared
for batch queries now takesPreparedQuery
by reference.