The ScyllaDB team is pleased to announce ScyllaDB Rust Driver 0.7.0,
an asynchronous CQL driver for Rust, optimized for Scylla, but also compatible with Apache Cassandra!
Some interesting statistics:
- over 67k downloads on crates;
- over 350 GitHub stars!
CachingSessionused to cache not only prepared statement IDs but also query parameters (such as page size) and those parameters overrode the ones provdided to
CachingSession::execute. This caused strange and inconsistent behavior. Now, query parameters are not cached but are always taken from the
Queryobject provided to
CachingSession::execute(caching_session: always inherit params from provided Query object by piodul · Pull Request #598 · scylladb/scylla-rust-driver · GitHub)
- Fixed a bug in a corner case of retry logic that could cause a panic in case
execute_iteris used to perform a write with a
DowngradingConsistencyPolicy(iterator: fix panic when retry policy returns IgnoreWriteError in iterator by piodul · Pull Request #609 · scylladb/scylla-rust-driver · GitHub)
- The driver now advertises its version to nodes that it connects to. The driver version is now visible in the
system.clientstable (connection: send DRIVER_VERSION in STARTUP message by avelanarius · Pull Request #611 · scylladb/scylla-rust-driver · GitHub)
- The derive macros in the
scylla-macroscrate can now be used on generic structs (Fix derives so that they work with generics by Ten0 · Pull Request #565 · scylladb/scylla-rust-driver · GitHub)
- Token-awareness for batches is now supported. Batches are routed with respect to the routing key of the first statement of the batch (Pick connections based on batch first statement's shard - v2 by Ten0 · Pull Request #573 · scylladb/scylla-rust-driver · GitHub)
- An optimization has been implemented which, in case of LWT queries, causes
TokenAwareStrategyto choose the nodes for queries in a predefined order, bypassing any shuffling coming from the child policy. This reduces the number of retries needed to perform an LWT update in case when multiple clients try to update the same key (https://github.com/scylladb/scylla-rust-driver/pull/578)
LatencyAwarePolicyhas been added which mimics the behavior of C++ driver’s latency aware routing. The new policy measures latency on a per-node basis and prefers nodes with lower latencies. Although this policy may be useful for some use cases, caution is advised as it was deprecated in C++ driver and also removed from the Java driver (https://github.com/scylladb/scylla-rust-driver/pull/536)
- It is now possible to restrict the set of keyspaces for which metadata is being fetched. This can reduce the amount of network traffic needed during metadata refresh in case the metadata for some keyspaces is not needed by the user (session: add keyspaces_to_fetch configuration by wyfo · Pull Request #576 · scylladb/scylla-rust-driver · GitHub)
- It is now possible to implement other authentication schemes via the
AuthenticatorSessiontraits. The previous, hardcoded password authentication scheme is now offered as
SessionBuilder::usermethod was kept for convenience) (Add support for custom authentication by Gor027 · Pull Request #572 · scylladb/scylla-rust-driver · GitHub)
CachingSessionnow supports custom hashers for use in the internal hashmap. By default, the default hasher from the standard library is used, but a more efficient implementation can be chosen by the user (Minimal implementation of custom hasher for CachingSession by colin-grapl · Pull Request #577 · scylladb/scylla-rust-driver · GitHub)
impl_from_cql_value_from_method!macro is added that allows you to easily generate
FromCqlValueimpls from your extension trait methods (cql_to_rust: expose impl_from_cql_value_from_method macro by piodul · Pull Request #601 · scylladb/scylla-rust-driver · GitHub)
Valuetrait used for serialization was implemented for
Boxand for references to unsized types, allowing to cover trait objects (
dyn T) as well (Implement Value for Vec<&dyn Value> and Vec<Box<dyn Value>> by rukai · Pull Request #590 · scylladb/scylla-rust-driver · GitHub)
- Retry policies now support serial consistency (retry_policy: Added support for SerialConsistency by wprzytula · Pull Request #585 · scylladb/scylla-rust-driver · GitHub)
CI / developer tools:
- Introduced scylla-proxy, a tool internal to the driver that allows intercepting and modifying requests and responses that are exchanged between the driver and the cluster. It is useful for simulating responses from the cluster that would be hard to trigger reliably without it - e.g. timeout errors (Proxy by wprzytula · Pull Request #496 · scylladb/scylla-rust-driver · GitHub)
- The tests now require a running 3-node Scylla cluster. In order to simplify testing, a Makefile has been added that sets up such a cluster with docker-compose before running the tests (Makefile by havaker · Pull Request #584 · scylladb/scylla-rust-driver · GitHub)
- The CI now also sets up a 3-node Cassandra cluster (Cassandra 3 nodes CI & proxy features enhancements by wprzytula · Pull Request #602 · scylladb/scylla-rust-driver · GitHub)
- Request serialization benchmarks have been added (Add benchmarks for request serialize by colin-grapl · Pull Request #581 · scylladb/scylla-rust-driver · GitHub)
Congrats to all contributors and thanks everyone for using our driver!
The source code of the driver can be found here:
GitHub - scylladb/scylla-rust-driver: Async CQL driver for Rust, optimized for Scylla!
Contributions are most welcome!
The official crates.io registry entry is here:
Thank you for your attention, please do not hesitate to contact us if you have any questions, issues, feature requests, or are simply interested in our driver!
Contributors since the last release: