Releases: scylladb/scylla-rust-driver
v0.8.2
Features:
- An optimization has been (re)added which improves efficiency of the LWT queries. It causes the driver to always choose replicas in the ring order which improves performance when there is a lot of per-partition key contention. (#717)
- The driver now closes connections if there is no response to CQL keepalives. (#731)
- TCP-level keepalives have been added. (#735)
- There is an option now to switch off write coalescing optimization in the driver. This "optimization" is technically a tradeoff - it improves efficiency when the throughput is high, but may cause worse latency in a busy application which does not send so many queries. (#725)
Security fixes:
- The
chronodependency no longer requires theoldtimefeature. That feature implies a transitive dependency ontimecrate in version 0.1, which has a vulnerability. More details here: https://rustsec.org/advisories/RUSTSEC-2020-0071 (#723)
Bugfixes:
- After execution profile support merge, the serial consistency was no longer set by default. It was an unintended and undocumented change; it is now fixed and the driver properly sets it to LocalSerial by default. (#729)
Enhancements:
- The
SessionConfig::add_known_nodes{_addr}andSessionBuilder::known_nodes{_addr}functions were made more generic and now they accept a wider range of argument types. (#705) - Clarified wording in the doc page about batches. (#712)
- An outdated driver version was specified in an example on the "Create project" page, now it points to a much newer one. (#715)
- An obsolete comment was removed from examples. (#716)
- A latency aware policy test with a very long name has been refactored so that it does not rely on timing, no longer causing flakiness of the CI. (#714)
- The CI now sets the
RUST_BACKTRACE=fullenvironment variable which causes full backtraces to be printed when panic occurs in tests. This should help in debugging issues, especially those that only occur in CI. (#719) - Integration tests have been refactored into a single binary. This should reduce the time needed to build the tests and improve test parallelism. (#730)
v0.8.1
Bugfixes:
- Token awareness now works correctly with
execute_iter. (#700) - A deadlock that occurs immediately when trying to send a query with latency aware policy set is now fixed. (#697)
- The documentation used to accidentally strip rust attributes from code examples, which is now fixed. (#684)
- If the database responds with an error during connection handshake, it will now be properly propagated to users. (#686)
Enhancements:
- The
set_retry_policy/get_retry_policymethods were brought back (they were removed previously with the introduction of execution profiles). (#707) - The default load balancing policy now supports rack-aware load balancing. (#666)
- Serialization/deserialization is now possible for array types. (#693)
- Various extensions to the execution profile API needed for the cpp-rust-driver project were added. (#690)
- The documentation now contains an example that shows how to connect to a serverless cluster. (#685)
CI:
v0.8.0
The ScyllaDB team is pleased to announce ScyllaDB Rust Driver 0.8.0,
an asynchronous CQL driver for Rust, optimized for Scylla, but also compatible with Apache Cassandra!
Some interesting statistics:
- over 145k downloads on crates;
- over 390 GitHub stars!
Notable changes
New features / enhancements:
- Support for the serverless Scylla Cloud has been introduced. (#614)
- The load balancing module was rewritten. The new API allowed for a more efficient implementation which does not allocate on the happy path when planning on which nodes to execute the query on. Existing load balancing policies have been unified into a single
DefaultPolicy, which is configurable and offers the same functionality as the previous, composable policies. (#612) - Execution profiles have been introduced. An execution profile represents a group of options applicable to a query. It is possible to associate a single execution profile with multiple queries, as well as change the execution profile for multiple queries at once if they share the same execution profile handle. See the docs for more details. (#592)
- Column types, UDT definitions etc. in the cluster metadata no longer refer to UDTs by name, instead they contain the whole definitions of the UDT. The driver topologically sorts the UDT definitions and resolves type dependencies after fetching metadata. (#649)
- If token aware routing is enabled, the load balancing policy used to always choose a random replica. This behavior can now be disabled so that replicas are always chosen in a fixed order. This can have performance benefits for some workloads as it can lead to better caching. (#667)
- The driver now uses nodes' host id instead of IPs for identification. There are ongoing efforts to allow Scylla nodes to change their IPs after restart, so this change in the driver serves as a preparation which - fortunately - is backwards-compatible with existing Scylla versions. (#617)
- Connection keepalives are now, by default, enabled and sent every 30 seconds. (#654)
- Spans attached to requests now contain more information, including request/response size, partition key, token, replica IPs etc. (#668)
- The
BatchValuestrait was simplified with the help of recently introduced Generic Associated Types (GATs). (#596) - The
impl FromCqlVal for CqlDuration, which was previously missing, was added. (#623) - The
impl FromCqlVal for Date, which was previously missing, was added. (#638) - Support for deserialization of types wrapped in
secrecy::Secretwas added. To enable it, you need to enable thesecretfeature. (#619) - Support for deserialization of DateTime was added. (#619)
- It is now possible to get information about the name of the current keyspace. (#663)
- The
Session::calculate_tokenis now public. (#658) - Now, most of the error types in the crate implement the
Clonetrait. (#669) - The
deser_cql_valuefunction was made public. It is used by thescylla-rust-udflibrary. (#630) - Dropped dependency on
ahashin tests. It wasn't really needed and, in some cases, could trigger a bug in the cargo resolver with a cryptic error message, which could prevent the whole project from compiling. (#625) - Hygiene of the procedural macros has been increased. Moreover, it is now possible to use them with conjunction with just
scylla-cqlby using the#[scylla_crate = "scylla_cql"]attribute. (#628) - Address translation now happens just before a connection is established. Previously, it happened during metadata fetch. This allows the user-provided
AddressTranslatorto be more dynamic - for example, if a node's IP changes and all connections are closed, if theAddressTranslatorreacts to this quickly then the driver can re-establish connections to this node much more quickly. (#641)
Bug fixes:
- The
Session::query_iter/execute_itermethods will now correctly work when used to send a write request. (#644)
Performance improvements:
- The internal method
Connection::query_allthat was used to fetch cluster metadata has been replaced withConnection::query_iter. The new method does not concatenate results from multiple pages into single one, but rather returns an iterator which allows processing the rows as they are fetched in the background. This should reduce memory usage during metadata fetch in some extreme cases. Moreover, the new method fits the upcoming "iterator-based deserialization" API rework better. (#645) - Calculation of some parameters passed to tracing used to allocate, which could lead to a significant performance impact. Now, they don't need to allocate. (#656)
PreparedStatementis now cheaper to clone. Its internals that allocated on clone are now wrapped in anArc. (#653)
CI / developer tool improvements:
- Now, IP addresses for scylla-proxy nodes are assigned automatically. Developers no longer need to specify IPs manually and worry about IP conflicts between the tests. (#621)
- The cluster that is set up both by CI and
Makefilenow boots Scylla nodes sequentially. This slows down the boot process, but the old method is technically incorrect and could result in a fail - the new method follows the best practices. (#647) - To aid in debugging cluster failures, now CI prints logs from the Scylla nodes at the end. (#646)
Other:
- MSRV was bumped up from 1.59 to 1.65. It was mainly done to support GATs. (#627)
Congrats to all contributors and thanks everyone for using our driver!
The source code of the driver can be found here:
- https://github.com/scylladb/scylla-rust-driver
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:
| commits | author |
|---|---|
| 108 | Wojciech Przytuła |
| 66 | Piotr Dulikowski |
| 18 | Michał Sala |
| 5 | Jan Ciolek |
| 5 | Wojciech Mitros |
| 3 | Jan Ciołek |
| 3 | Thomas BESSOU |
| 1 | Gor Stepanyan |
| 1 | Sining (Stephen) Ma |
| 1 | Ten0 |
v0.7.0
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!
Notable changes
Bugs fixed:
- The
CachingSessionused to cache not only prepared statement IDs but also query parameters (such as page size) and those parameters overrode the ones provdided toCachingSession::execute. This caused strange and inconsistent behavior. Now, query parameters are not cached but are always taken from theQueryobject provided toCachingSession::execute(#598) - Fixed a bug in a corner case of retry logic that could cause a panic in case
query_iter/execute_iteris used to perform a write with aDowngradingConsistencyPolicy(#609) - The driver now advertises its version to nodes that it connects to. The driver version is now visible in the
system.clientstable (#611) - The derive macros in the
scylla-macroscrate can now be used on generic structs (#565)
New features/enhancements:
- Token-awareness for batches is now supported. Batches are routed with respect to the routing key of the first statement of the batch (#573)
- 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 (#578) - The
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 (#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 (#576)
- It is now possible to implement other authentication schemes via the
AuthenticatorProviderandAuthenticatorSessiontraits. The previous, hardcoded password authentication scheme is now offered asPlainTextAuthenticator(although theSessionBuilder::usermethod was kept for convenience) (#572) - The
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 (#577) - The
impl_from_cql_value_from_method!macro is added that allows you to easily generateFromCqlValueimpls from your extension trait methods (#601) - The
Valuetrait used for serialization was implemented forBoxand for references to unsized types, allowing to cover trait objects (dyn T) as well (#590) - Retry policies now support serial consistency (#585)
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 (#496)
- 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 (#584)
- The CI now also sets up a 3-node Cassandra cluster (#602)
- Request serialization benchmarks have been added (#581)
Congrats to all contributors and thanks everyone for using our driver!
The source code of the driver can be found here:
- https://github.com/scylladb/scylla-rust-driver
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:
| commits | author |
|---|---|
| 63 | Wojciech Przytuła |
| 10 | Michał Sala |
| 10 | Thomas BESSOU |
| 9 | Piotr Dulikowski |
| 5 | Colin O'Brien |
| 2 | Gor Stepanyan |
| 2 | colin-grapl |
| 1 | Jan Ciolek |
| 1 | Joseph Perez |
| 1 | Lucas Kent |
| 1 | Piotr Grabowski |
v0.6.1
v0.6.0
The ScyllaDB team is pleased to announce ScyllaDB Rust Driver 0.6.0,
an asynchronous CQL driver for Rust, optimized for Scylla, but also compatible with Apache Cassandra!
The numbers are constantly growing:
- over 53k downloads on crates;
- over 320 GitHub stars!
=== Notable changes ===
- Introduced HostFilter abstraction. HostFilter can be used to prevent the driver from connecting to some of the nodes in the cluster, e.g. you can use DcHostFilter to connect only to the nodes from the local datacenter.
- DcAwareRoundRobin policy can now be configured not to return nodes outside the configured DC at all (previously it just returned them after the DC-local nodes).
- Introduced AddressTranslator. This feature makes it possible for the driver to correctly connect to clusters which are behind NAT.
- CachingSession has gained support for batches.
- The
batchmethod now returnsQueryResultinstead ofBatchResult. It no longer ignores rows returned by the database and it is now possible to learn whether a LWT batch has been applied or not. - After issuing a schema-altering query, the driver automatically updates the metadata - it is no longer needed to refresh it manually afterwards.
- It is now possible to get information about replicas relevant to given query and partition key via
ClusterData::get_endpoints. - It is now possible to get detailed information about the way the driver executed a query with the help of the HistoryListener trait.
- A request coalescing optimization has been implemented. Before flushing data to the socket, the task responsible for it yields once. In our tests, this resulted in increased efficiency: less flushes were made, which should lead to larger packets being sent, reducing the overhead needed to send the same amount of data.
- Information about materialized views in the Metadata was extended to contain information about the view's base table.
- Information about nodes' sharders (i.e. number of shards and the
msb_ignoreparameter) is now available. - Support for RateLimitReached error has been added. The new error will be returned in ScyllaDB 5.1 by the upcoming per-partition rate limiting feature.
- Assorted improvements to documentation, CI, and some refactors.
Congrats to all contributors and thanks everyone for using our driver!
=======================
The source code of the driver can be found here:
- https://github.com/scylladb/scylla-rust-driver
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 last release:
commits|author
30 Jan Ciolek
10 Wojciech Przytuła
9 Piotr Dulikowski
4 Joseph Perez
2 Gor Stepanyan
2 Piotr Sarna
1 Thomas BESSOU
v0.5.0
The ScyllaDB team is delighted to announce ScyllaDB Rust Driver 0.5.0,
an asynchronous CQL driver for Rust, optimized for Scylla, but also compatible with Apache Cassandra!
Cool, ever growing open-source stats:
- over 38k downloads on crates;
- over 300 GitHub stars!
=== Notable changes ===
- Client-side timeouts are here! Request timeout can be set for a session, or, with higher granularity, for a specific statement.
- CachingSession implementation was simplified, it no longer reimplements separate repreparation logic.
- Continuous integration tests are now run on a 3-node cluster, increasing the test coverage for whole classes of distributed errors.
- CQL logic was extracted to a separate scylla-cql crate, so that it can be reused by other projects.
- Debug was implemented for a few important structs - Session, PreparedStatement, etc.
- In certain cases, retry policy will not properly react on an error returned from the database and not retry - this is now fixed.
- Materialized view info is now included when fetching database schema.
- TracingInfo now has a neat helper function, which returns the list of nodes that took part in processing given request
- DowngradingConsistency policy is implemented (although it's only recommended for very specific use-cases).
- It's now possible to obtain a list of replicas that are most likely to serve given statement,
by computing owner nodes of a particular token, if this information is available. - Clone implementation for PreparedStatement got slimmed, now it does not copy an unnecessary list of tracing ids.
Also, the usual stuff: fixes, speedups, amendments, doc updates and example updates were all applied.
Congrats to all contributors and thanks everyone for using our driver!
=======================
The source code of the driver can be found here:
- https://github.com/scylladb/scylla-rust-driver
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 last release:
commits|author
28 Wojciech Przytuła
14 Piotr Sarna
13 Piotr Dulikowski
13 Jan Ciołek
2 Lucas Kent
1 David Garcia
1 Gor Stepanyan
v0.4.7
v0.4.6
- Prepared metadata is now accessible for users.
- Rust edition is bumped to 2021.
- Prepared queries without proper partition key information (which may happen if not all partition key columns are bound markers) used to erroneously be routed to a single shard of a specific node, or group of nodes. This behavior is now fixed, and such queries are treated as unprepared queries - they go to a random node.
- Session initialization will now fail if control connections failed to establish; an error in fetching metadata is still not fatal, but if the control connection couldn't be established at all, it indicates that the session is not functional.
v0.4.5
- CDC partitioner support was added
towerintegration example was added- CQL type parser was rewritten to recursive-descent, to properly handle nested types
- failing to fetch metadata is now non-fatal
- uuid and dashmap dependencies were updated
- the driver now officially declares its minimum supported Rust version: 1.59
- CI is updated accordingly, to ensure that we work properly on the minimum Rust version