Skip to content

Commit

Permalink
version bump
Browse files Browse the repository at this point in the history
  • Loading branch information
krojew committed Apr 25, 2024
1 parent 0ea57ce commit 4b0b226
Show file tree
Hide file tree
Showing 3 changed files with 100 additions and 51 deletions.
2 changes: 1 addition & 1 deletion cassandra-protocol/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cassandra-protocol"
version = "3.1.1"
version = "3.2.0"
authors = ["Alex Pikalov <alex.pikalov.khar@gmail.com>", "Kamil Rojewski <kamil.rojewski@gmail.com>"]
edition = "2018"
description = "Cassandra protocol implementation"
Expand Down
4 changes: 2 additions & 2 deletions cdrs-tokio/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cdrs-tokio"
version = "8.1.2"
version = "8.1.3"
authors = ["Alex Pikalov <alex.pikalov.khar@gmail.com>", "Kamil Rojewski <kamil.rojewski@gmail.com>"]
edition = "2018"
description = "Async Cassandra DB driver written in Rust"
Expand All @@ -23,7 +23,7 @@ arc-swap.workspace = true
atomic = "0.6.0"
bytemuck = { version = "1.15.0", features = ["derive"] }
bytes.workspace = true
cassandra-protocol = { path = "../cassandra-protocol", version = "3.1.1" }
cassandra-protocol = { path = "../cassandra-protocol", version = "3.2.0" }
cdrs-tokio-helpers-derive = { path = "../cdrs-tokio-helpers-derive", version = "5.0.3", optional = true }
derive_more.workspace = true
derivative.workspace = true
Expand Down
145 changes: 97 additions & 48 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 8.1.3

* Dependency updates.

## 8.1.2

### Changed
Expand All @@ -14,31 +18,36 @@

### Fixed

* Sending envelopes now properly jumps to next node in query plan, if current one is unreachable.
* Sending envelopes now properly jumps to next node in query plan, if current
one is unreachable.

### New

* `InvalidProtocol` special error for a case when a node doesn't accept requested protocol during handshake.
* `InvalidProtocol` special error for a case when a node doesn't accept
requested protocol during handshake.
* `ConnectionPoolConfigBuilder` for building configuration easily.
* Configurable heartbeat messages to keep connection alive in the pool.

### Changed

* Due to an edge case with reconnecting to a seemingly downed node, internal reconnection handling mechanism has been improved.
* 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.

## 8.0.0 (unavailable)

### Changed

* Removed `Ord, ParialOrd` from `QueryFlags`.
* Using `rustls` types exported from `tokio-rustls`, rather than depending on `rustls` directly.
* Using `rustls` types exported from `tokio-rustls`, rather than depending
on `rustls` directly.

## 8.0.0-beta.1

### Fixed

* Fixed stack overflow when cannot determine field type during struct serialization.
* Fixed stack overflow when cannot determine field type during struct
serialization.
* Properly supporting references during struct serialization.

### New
Expand All @@ -49,7 +58,8 @@
### Changed

* 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.
* 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()`.

## 7.0.4
Expand Down Expand Up @@ -90,9 +100,11 @@

### Changed

* Control connection errors are now logged as warnings, since they're recoverable.
* Control connection errors are now logged as warnings, since they're
recoverable.
* Exposed fields of `BodyReqAuthResponse` and `BodyReqExecute`.
* Replaced `CInet` type with `SocketAddr`, since it was nothing more than a wrapper.
* Replaced `CInet` type with `SocketAddr`, since it was nothing more than a
wrapper.

## 7.0.0-beta.2

Expand All @@ -115,38 +127,48 @@

### New

* Protocol V5 support. Please look at official changelog for more information: https://github.com/apache/cassandra/blob/trunk/doc/native_protocol_v5.spec#L1419.
* 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>` for `BigInt`.
* `check_envelope_size` for `Evelope`.
* `Error` is now `Clone`.
* `FrameEncoder`, `FrameDecoder` and `FrameEncodingFactory` responsible for encoding/decoding frames on the wire.
* `with_frame_encoder_factory` Session build option.
* `FrameEncoder`, `FrameDecoder` and `FrameEncodingFactory` responsible for
encoding/decoding frames on the wire.
* `with_frame_encoder_factory` Session build option.
* `Error` impl for `CheckEnvelopeSizeError` and `ParseEnvelopeError`.
* New `Error` variants for more granular error handling.
* Node address in `Error::Server` variant.

### Changed

* Due to naming changes in V5, frame have been renamed to message, `Frame` to `Envelope` and a frame now
* Due to naming changes in V5, frame have been renamed to message, `Frame`
to `Envelope` and a frame now
corresponds to wrapped envelopes, as defined by the protocol.
* `Serialize` and `FromCursor` traits now pass protocol version to implementations.
* `Serialize` and `FromCursor` traits now pass protocol version to
implementations.
* `Row::from_frame_body` renamed to `from_body`.
* `ClusterMetadataManager::find_node` renamed to `find_node_by_rpc_address` for consistency.
* `QueryFlags` got extended for V5 and now supports `Serialize` and `FromCursor`.
* `ClusterMetadataManager::find_node` renamed to `find_node_by_rpc_address` for
consistency.
* `QueryFlags` got extended for V5 and now supports `Serialize`
and `FromCursor`.
* Session builders now validate given configuration and return a `Result`.
* Transport startup now fails gracefully on unexpected server response.
* `CdrsTransport` now requires explicit information if messages are a part of initial handshake.
* `ResResultBody::as_rows_metadata` and `ResponseBody::as_rows_metadata` now return a reference to the data.
* `Hash`, `PartialEq` and `PartialOrd` for `PreparedQuery` only take `id` and `result_metadata_id` into account,
* `CdrsTransport` now requires explicit information if messages are a part of
initial handshake.
* `ResResultBody::as_rows_metadata` and `ResponseBody::as_rows_metadata` now
return a reference to the data.
* `Hash`, `PartialEq` and `PartialOrd` for `PreparedQuery` only take `id`
and `result_metadata_id` into account,
since those define equivalence.
* Updated `chrono` dependency to work around found CVE.

## 6.2.0

### New

* `derive` feature built into the main crate - no need to explicitly `use cdrs_tokio_helpers_derive::*` anymore.
* `derive` feature built into the main crate - no need to
explicitly `use cdrs_tokio_helpers_derive::*` anymore.

## 6.1.0

Expand All @@ -160,16 +182,22 @@

## 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
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` and `TopologyAwareLoadBalancingStrategy`.
* New `ReconnectionPolicy` used when trying to re-establish connections to downed nodes.
* Topology-aware load balancing: `TopologyAwareNodeDistanceEvaluator`
and `TopologyAwareLoadBalancingStrategy`.
* New `ReconnectionPolicy` used when trying to re-establish connections to
downed nodes.
* `Error` now implements standard `Error`.
* `SessionBuilder` introduced as the preferred way to create a session.
* Added missing traits for `BatchType` and `QueryFlags`.
Expand All @@ -186,30 +214,45 @@ understated.

### Changed

* All `with_name` fields or args in the query API are now `bool` instead of `Option<bool>`
* `flags` field removed from `QueryParams` (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()` in `Session`.
* Replaced `RowsMetadataFlag`, `QueryFlags` and `frame::Flags` vectors with bitflags.
* Changed `Target` and `ChangeType` enums to `SchemaChangeTarget` and `SchemaChangeType`.
* The `varint` type now uses `num::BigInt` representation (this implies `Decimal` 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 new `Serialize` trait due to performance penalty.
* All `with_name` fields or args in the query API are now `bool` instead
of `Option<bool>`
* `flags` field removed from `QueryParams` (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()` in `Session`.
* Replaced `RowsMetadataFlag`, `QueryFlags` and `frame::Flags` vectors with
bitflags.
* Changed `Target` and `ChangeType` enums to `SchemaChangeTarget`
and `SchemaChangeType`.
* The `varint` type now uses `num::BigInt` representation (this
implies `Decimal` 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 new `Serialize` trait due to performance
penalty.
* Removed `FromSingleByte` and `AsByte` in favor of `From`/`TryFrom`.
* Removed traits along with `async-trait` dependency: `BatchExecutor`, `ExecExecutor`, `PrepareExecutor`,
`QueryExecutor`, `GetConnection` and `CdrsSession`. Everything is now embedded directly in `Session`.
* Load balancing strategy now returns query plans, rather than individual nodes, and operates on cluster metadata.
* Removed traits along with `async-trait`
dependency: `BatchExecutor`, `ExecExecutor`, `PrepareExecutor`,
`QueryExecutor`, `GetConnection` and `CdrsSession`. Everything is now embedded
directly in `Session`.
* 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` to `connect_generic`.
* Removed `GetRetryPolicy`.
* Renamed `ChangeSchemeOptions` to `SchemaChangeOptions`.
* Protocol version can now be selected at run time.
* `Value` now directly contains the value in the `Some` variant instead of a separate body field.
* `Value` now directly contains the value in the `Some` variant instead of a
separate body field.
* Consistent naming convention in all builders.
* Split protocol-level parameters from high-level statement parameters (`QueryParams` vs `StatementParams`) and
* Split protocol-level parameters from high-level statement
parameters (`QueryParams` vs `StatementParams`) and
simplified API.
* `add_query_prepared` for batch queries now takes `PreparedQuery` by reference.

Expand All @@ -233,23 +276,29 @@ understated.

### New

* New `connect_generic_*` functions allowing custom connection configurations (see `generic_connection.rs`
* New `connect_generic_*` functions allowing custom connection configurations (
see `generic_connection.rs`
for example usage).
* Possibility to use custom error types which implement `FromCdrsError` throughout the crate.
* Possibility to use custom error types which implement `FromCdrsError`
throughout the crate.
* `Consistency` now implements `FromStr`.
* Pagers can be converted into `PagerState`.
* Support for v4 marshaled types.
* `Copy`, `Clone`, `Ord`, `PartialOrd`, `Eq`, `Hash` for `Opcode`.
* Customizable query retry policies with built-in `FallthroughRetrySession` and `DefaultRetryPolicy`.
* Customizable query retry policies with built-in `FallthroughRetrySession`
and `DefaultRetryPolicy`.

### Changed

* TCP configuration now owns contained data - no need to keep it alive while the config is alive.
* TCP configuration now owns contained data - no need to keep it alive while the
config is alive.
* `ExecPager` is now public.
* `Bytes` now implements `From` for supported types, instead of `Into`.
* Moved some generic types to associated types, thus removing a lot of type passing.
* Moved some generic types to associated types, thus removing a lot of type
passing.
* `SessionPager` no longer needs mutable session.
* A lot of names have been migrated to idiomatic Rust (mainly upper camel case abbreviations).
* A lot of names have been migrated to idiomatic Rust (mainly upper camel case
abbreviations).

## 3.0.0

Expand All @@ -271,7 +320,7 @@ understated.

### Fixed

* Recreation of forgotten prepared statements.
* Recreation of forgotten prepared statements.

### New

Expand Down

0 comments on commit 4b0b226

Please sign in to comment.