- Fixed not re-preparing statements in batch queries.
- New
Session::prepare_raw_tw_with_query_plan()function.
- Removed deprecated functions.
- Fixed pool leak (by jojoxhsieh).
- Fixed deadlock on transport error (by jojoxhsieh).
- Not recreating connections on down event if there are still apparently open ones.
- Refreshing node information can preserve invalid
Downstate (by Denis Kosenkov).
- Race condition when reconnecting to a cluster with all nodes down (by Denis Kosenkov).
- CPU spike after some time running.
- Dependency updates.
- Dependency updates.
- Non-fatal errors closing connections.
- Sending envelopes now properly jumps to next node in query plan, if current one is unreachable.
InvalidProtocolspecial error for a case when a node doesn't accept requested protocol during handshake.ConnectionPoolConfigBuilderfor building configuration easily.- Configurable heartbeat messages to keep connection alive in the pool.
- Due to an edge case with reconnecting to a seemingly downed node, internal reconnection handling mechanism has been improved.
- Hidden internal structures, which were public but not usable in any way.
- Removed
Ord, ParialOrdfromQueryFlags. - Using
rustlstypes exported fromtokio-rustls, rather than depending onrustlsdirectly.
- Fixed stack overflow when cannot determine field type during struct serialization.
- Properly supporting references during struct serialization.
- Many types are now
Debug. - HTTP proxy support via the
http-proxyfeature.
- Made protocol enums non-exhaustive for future compatibility.
- Session builders are now async and wait for control connection to be ready before returning a session.
CBytes::new_empty()->CBytes::new_null(),CBytes::is_empty()->CBytes::is_null_or_empty().
- Invalid Murmur3 hash for keys longer than 15 bytes.
- Fixed serialization of routing key with known indexes.
- Deprecated
query_with_param()inPager, in favor ofquery_with_params().
- Serializing single PK routing keys by index.
- Encoding envelopes with tracing/warning flags.
- Overflow when compressed envelope payload exceeds max payload size.
- Integer overflow when not received at least 8 header bytes.
Cloneimplemented forBodyResReadyandBodyReqExecute.
- Control connection errors are now logged as warnings, since they're recoverable.
- Exposed fields of
BodyReqAuthResponseandBodyReqExecute. - Replaced
CInettype withSocketAddr, since it was nothing more than a wrapper.
- Constant control connection re-establishing with legacy clusters.
ResponseBody::into_errorfunction.
ExponentialReconnectionScheduleduration overflow.- Forgetting real error type in certain transport error situations.
- Not sending re-preparation statements to correct nodes.
- Infinite set keyspace notification loop.
- Protocol V5 support. Please look at official changelog for more information: https://github.com/apache/cassandra/blob/trunk/doc/native_protocol_v5.spec#L1419.
- Support for beta protocols - possibility to connect to beta clusters.
From<Decimal>forBigInt.check_envelope_sizeforEvelope.Erroris nowClone.FrameEncoder,FrameDecoderandFrameEncodingFactoryresponsible for encoding/decoding frames on the wire.with_frame_encoder_factorySession build option.Errorimpl forCheckEnvelopeSizeErrorandParseEnvelopeError.- New
Errorvariants for more granular error handling. - Node address in
Error::Servervariant.
- Due to naming changes in V5, frame have been renamed to message,
FrametoEnvelopeand a frame now corresponds to wrapped envelopes, as defined by the protocol. SerializeandFromCursortraits now pass protocol version to implementations.Row::from_frame_bodyrenamed tofrom_body.ClusterMetadataManager::find_noderenamed tofind_node_by_rpc_addressfor consistency.QueryFlagsgot extended for V5 and now supportsSerializeandFromCursor.- Session builders now validate given configuration and return a
Result. - Transport startup now fails gracefully on unexpected server response.
CdrsTransportnow requires explicit information if messages are a part of initial handshake.ResResultBody::as_rows_metadataandResponseBody::as_rows_metadatanow return a reference to the data.Hash,PartialEqandPartialOrdforPreparedQueryonly takeidandresult_metadata_idinto account, since those define equivalence.- Updated
chronodependency to work around found CVE.
derivefeature built into the main crate - no need to explicitlyuse cdrs_tokio_helpers_derive::*anymore.
#[must_use]on some functions.
- Fixed parsing
NetworkTopologyStrategy.
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.
- Topology-aware load balancing:
TopologyAwareNodeDistanceEvaluatorandTopologyAwareLoadBalancingStrategy. - New
ReconnectionPolicyused when trying to re-establish connections to downed nodes. Errornow implements standardError.SessionBuilderintroduced as the preferred way to create a session.- Added missing traits for
BatchTypeandQueryFlags. ToStringimplementation forSimpleServerEvent.- Standard trait implementations for event frames.
contains_column,is_empty_by_nameandis_emptyfunctions forRow.Displayimplementation for public enums.- Missing traits for
PreparedMetadata,Value,ConsistencyandColType. - New
PreparedMetadataFlags. - New
ClusterMetadatarepresenting information about a cluster. - Extracted protocol functionality to separate
cassandra-protocolcrate. - Passing final auth data from the server to
SaslAuthenticator. SpeculativeExecutionPolicyfor speculative execution control.
- All
with_namefields or args in the query API are nowboolinstead ofOption<bool> flagsfield 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,QueryFlagsandframe::Flagsvectors with bitflags. - Changed
TargetandChangeTypeenums toSchemaChangeTargetandSchemaChangeType. - The
varinttype now usesnum::BigIntrepresentation (this impliesDecimalalso uses "big" types). - Removed
unstable-dynamic-clusterfeature, since it wasn't working as expected and introduced performance
penalty. Dynamic topology handling is now built-in. - Removed
AsBytesin favor of newSerializetrait due to performance penalty. - Removed
FromSingleByteandAsBytein favor ofFrom/TryFrom. - Removed traits along with
async-traitdependency:BatchExecutor,ExecExecutor,PrepareExecutor,QueryExecutor,GetConnectionandCdrsSession. Everything is now embedded directly inSession. - Load balancing strategy now returns query plans, rather than individual nodes, and operates on cluster metadata.
- Removed
SingleNodeload balancing strategy. - Removed empty
SimpleError. - Renamed
connect_generic_statictoconnect_generic. - Removed
GetRetryPolicy. - Renamed
ChangeSchemeOptionstoSchemaChangeOptions. - Protocol version can now be selected at run time.
Valuenow directly contains the value in theSomevariant instead of a separate body field.- Consistent naming convention in all builders.
- Split protocol-level parameters from high-level statement
parameters (
QueryParamsvsStatementParams) and simplified API. add_query_preparedfor batch queries now takesPreparedQueryby reference.
- Support for stateful SASL authenticators.
- Using up-to-date lz4 crate (no more unmaintained dependency alerts).
- Build problems with Rustls.
- TLS connections sometimes not flushing all data.
- Not setting current namespace when not using an authenticator.
- New
connect_generic_*functions allowing custom connection configurations ( seegeneric_connection.rsfor example usage). - Possibility to use custom error types which implement
FromCdrsErrorthroughout the crate. Consistencynow implementsFromStr.- Pagers can be converted into
PagerState. - Support for v4 marshaled types.
Copy,Clone,Ord,PartialOrd,Eq,HashforOpcode.- Customizable query retry policies with built-in
FallthroughRetrySessionandDefaultRetryPolicy.
- TCP configuration now owns contained data - no need to keep it alive while the config is alive.
ExecPageris now public.Bytesnow implementsFromfor supported types, instead ofInto.- Moved some generic types to associated types, thus removing a lot of type passing.
SessionPagerno longer needs mutable session.- A lot of names have been migrated to idiomatic Rust (mainly upper camel case abbreviations).
- Remembering
USEd keyspaces across connections. - Race condition on query id overflow.
- Removed deprecated
PasswordAuthenticator. - Removed unused
Compressortrait. - Large API cleanup.
- Renamed
IntoBytestoAsBytes. Authenticatorcan now be created at runtime - removed static type parameter.- Removed unneeded memory allocations when parsing data.
- Recreation of forgotten prepared statements.
rustlssessions constructors.
- Updated
tokioto 1.1.
- Support for
NonZero*types. - Support for
chronoNaiveDateTimeandDateTime<Utc>. - Update
tokioto 1.0. PagersupportingQueryValuesand consistency.
- Initial release.