[RELEASE] ScyllaDB Rust Driver 0.10.0

The ScyllaDB team is pleased to announce ScyllaDB Rust Driver 0.10.0,
an asynchronous CQL driver for Rust, optimized for Scylla, but also compatible with Apache Cassandra!

Some interesting statistics:

  • over 685k downloads on crates;
  • over 460 GitHub stars!

Notable changes

API cleanups / breaking changes:

  • Bumped MSRV to 1.66 (#810)
  • Slimmed down schema agreement API to make it’s usage less error-prone to race conditions and deadlocks. (#779)
  • Added Serial and LocalSerial levels to Consistency enum because those are valid levels for LWT SELECTs. LegacyConsistency became redundant so it was removed. (#792)
  • Made it impossible to specify preferred rack without specifying preferred datacenter. This was already invalid configuration, now the API is changed so that it is unrepresentable. (#775)
  • Un-pub some types and methods that are not part of intended public API. (#774). There were also a lot of other pub specifiers removed but those should not result in API-break. (#773)
  • Made StatementConfig private - it is used internally and does not appear in any public API. retry_policy field is moved there from Query, PreparedStatement and Batch. (#772)
  • Change load balancing policy so that Rack awareness works also with non-token-aware queries (e.g. unprepared statements). Now, local rack nodes are preferred in pick() and fallback() methods. Signature of ReplicaSet::choose_filtered() is slightly changed (a reference is added to predicate’s argument). (#777)

New features / enhancements:

  • Changed Partitioners’ API to be stateful, similar to std::hash. Changed all it’s usages to take advantage of this functionality, getting rid of a lot of needless allocations of partition key. This decreased number of allocations and improved performance. (#758)
  • Driver now re-resolves hostnames when none of known peers can’t be reached. This is to support the case when all nodes change their IP - previously driver was unable to reconnect to cluster again after control connection failed in this situation. Control connection now begins reconnection attempts immediately after it breaks. (#770)
  • Procedural macros in scylla-macros now use produce proper compilation errors instead of panicking, resulting in nicer error messages. (#818)
  • Size calculation in serialization is improved, hopefully resulting in fewer reallocations (#809)
  • Added support for serializing / deserializing HashMap and HashSet with custom hashers. (#808)
  • Implemented serialization for &[u8], which allows deriving ValueList for structs with &[u8] fields. (#790)
  • Some performance optimisations by avoiding cloning. (#780)
  • Moved write_coalescing() method from SessionBuilder to GenericSessionBuilder as there is nothing preventing using it in Cloud. (#778)
  • Topology refresh interval is now configurable - see cluster_metadata_refresh_interval method on GenericSessionBuilder. (#776)

Documentation:

  • Added docstring for AddressTranslator trait. (#796)
  • Improved docs about handling UDTs. Now it clearly mentions the fact that UDT’s and Rust struct’s fields must be in the same order. (#789)
  • Documentation is now built for latest release too, not only main branch. It also defaults to latest release. (#784)

Bug fixes:

  • Bumped the version of chrono dependency to the one that supports functionality that we use. (#807)
  • Downgraded criterion to 0.4 because 0.5 used version of clap that has MSRV higher than ours. (#799)
  • Fixed deserialization of compound partition keys. Driver sometimes used wrong column from metadata when deserializing them due to improper lookup logic. (#795)

CI / developer tool improvements:

  • Fixes for clippy warnings. (#805)
  • Added cmdline example of proxy usage, useful for manual testing of DNS related functionalities in drivers. (#797)
  • Proxy now always asks Scylla for shard number it connected to and sends that information back to the client. (#788)
  • Added instructions on updating documentation to RELEASE.md . (#785)
  • Fixed documentation build process. (#783)
  • Make it clearer where new session builder methods should go (SessionBuilder vs GenericSessionBuilder) to prevent CloudSessionBuilder not getting the functionalities that it should. (#781)

Others:

  • Removed a leftover TODO. (#803)
  • Updated syn (non-public dependency) to 2.0. (#782)

Congrats to all contributors and thanks everyone for using our driver!


The source code of the driver can be found here:

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
79 Wojciech Przytuła
34 Piotr Dulikowski
4 Anna Stuchlik
2 Pavel Kirilin
1 Karol Baryła
1 Collin Styles
1 Jan Ciołek
1 Lucas Kent
1 Rishabh Aryal
1 koheatel