Releases: scylladb/scylla-rust-driver
v0.13.0
The ScyllaDB team is pleased to announce ScyllaDB Rust Driver 0.13.0,
an asynchronous CQL driver for Rust, optimized for Scylla, but also compatible with Apache Cassandra!
Some interesting statistics:
- over 1,615k downloads on crates!
- over 520 GitHub stars!
Changes
API cleanups / breaking changes:
- Implemented support for Tablets, a new major architectural feature of Scylla that will be a part of upcoming 6.0 release. This support is required for token (and shard) awareness to work with Tablet-based tables. You can read more about Tablets in a blogpost by Tomasz Grabiec or watch a presentation by Avi Kivity (#937)
- Enabled shard-selecting load balancing. Before, a
LoadBalancingPolicy
would return aPlan
consisting ofNode
s;
now, together with aNode
it can optionally specify theShard
to contact as well. This is crucial for proper Tablets support (see above). Main PR #944, with follow up #969 Token
: added constructor and normalization to increase type-safety (#948)- Removed another unstable dependency,
histogram::Histogram
, from public API (#935) - Implemented CQL protocol-level optimisation: prepared statement result metadata can be now used to decode rows. This saves network bandwidth if that option is enabled, because result metadata need not be sent with each DB query result. (#925)
- Removed
num_enum
dependency. It was unstable, and we managed to do without it, so it no longer appears in the public API. (#931) - Decreased pub visibility of
scylla-cql
definitions which weren't intended for access from outside the driver. (#933)
New features / enhancements:
- Improved the
FromRow
derive macro to suppport structs with unnamed fields. Before, only structs with named fields were supported. (#985) - testing: Increased timeout for fetching tracing info - Cassandra was so slow in tests that our CI used to fail sometimes... (#966)
- Removed
strum
andstrum_macros
dependencies. They were unstable, and we managed to do without it. (#934)
Documentation:
- Got rid of (most) uses of
QueryResult::rows
. The preferred method is the more type safeQueryResult::rows_typed
. Moreover,QueryResult::rows
is going to be deprecated in the next release, once the new lazy deserialization framework is introduced. We thus recommend switching torows_typed
wherever possible. (#955)
CI / developer tool improvements:
- Removed unreachable
pub
s (#958) - Dealed with
chrono
deprecations (#951) - CI: run
cargo clean
before tests (#929) - CI: small fixes in semver checks (#942)
- CI: semver_checks now edits its comment instead of posting new one, so that the PR wall is less cluttered. (#952)
- CI: Tracing output is now shown for a test iff the test failed. This is a major aid in debugging in CI. (#959)
- Reverted "CI/Makefile: disable
uninlined_format_args
clippy lint", asrust-analyzer
now properly supports semantic analysis of such format args. (#945) - Appeased Clippy again (#971)
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 |
---|---|
40 | Karol Baryła |
24 | Mikołaj Uzarski |
10 | Wojciech Przytuła |
1 | Piotr Dulikowski |
1 | Piotr Grabowski |
v0.12.0
The ScyllaDB team is pleased to announce ScyllaDB Rust Driver 0.12.0,
an asynchronous CQL driver for Rust, optimized for Scylla, but also compatible with Apache Cassandra!
Some interesting statistics:
- over 1,156k downloads on crates!
- over 500 GitHub stars; We passed 500 stars!
Changes
API cleanups / breaking changes:
- Introduced
CqlTimeuuid
type.Timeuuid
CQL type now corresponds to the new type instead ofUuid
. The purpose of new type is mostly providing correct semantics (matching the database) with regard to sorting / comparing / hashing (#894) - Public usages of
num_bigint::BigInt
are now hidden behind feature flag. Support fornum_bigint 0.4
is added. You can enable support for chosen version usingnum-bigint-03
/num-bigint-04
feature flags (#902) bigdecimal
dependency version is bumped to 0.4. Similarly toBigInt
, usages ofbigdecimal
are now behind feature-flagbigdecimal-04
(#922)
New features / enhancements:
SerializeRow
andSerializeCql
derive macros now supportskip
field attribute to skip some fields during serialization (#903)
Documentation:
- Documentation for
SerializeRow
/SerializeCql
derive macros is now rendered only inscylla
crate. Previously it was only visible inscylla-cql
due to an oversight, which made it hard to discover for users. It is not possible to render it in both crates without duplicating it in code because of rustdoc limitation (#907) - Examples now use different table and keyspace names so that running multiple of them on the same cluster works correctly (#846)
- Added section discouraging use of multiple / short-lived
Session
objects and recommendations about sharingSession
objects between threads. You can find this section inConnecting to the cluster
page of book (#914)
Bug fixes:
- Some
time
-related were put behindchrono
feature flag instead oftime
feature flag (#898) chrono
introduced an arguably breaking change - changing values ofNaiveDate::MIN/MAX
. We changed our tests to nor rely on those values. If you used those values as markers / placeholders in database, you may not be able to deserialize them with new version ofchrono
(#919)
CI / developer tool improvements:
- Purpose of
Cargo.lock.msrv
file and ways to update this file when min_rust job are now documented inCONTRIBUTING.md
(#913) - Building documentation using Scylla's Sphinx tooling now uses myst parser instead of deprecated recommonmark. One improvement is markdown table support (#874)
- Our documentation must work with Scylla's Sphinx tooling, so it contains ToC (Table of Contents) sections that are not supported by
mdbook
. In order to be able to build it withmdbook
we had a wrapper script that stripped those sections before callingmdbook
. Now this script is replaced by preprocessor script called automatically bymdbook
- so just callingmdbook
commands "just works" again now (#910). - New Markdown parser for Sphinx parser, and our preprocessor mentioned in previous point, now support warning admonition with the following syntax (#914):
:::{warning}
text
:::
- Fixed new clippy warnings introduced in Rust 1.75 (#900)
- Introduced cargo-semver-checks tool to our CI to decrease the chance of releasing a breaking change after we are at 1.0 (#909)
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 |
---|---|
31 | Mikołaj Uzarski |
31 | Karol Baryła |
13 | Piotr Dulikowski |
2 | Oliver Bøving |
1 | David Garcia |
1 | Nick Sippl-Swezey |
v0.11.1
Due to our mistake, crate scylla-macros 0.2.2
contained a breaking change, while only being a minor version bump.
This resulted in the driver breaking for some existing projects that use version 0.10.x
.
You can find more detailed explanation here: #891
To solve this situation:
scylla-macros 0.3.0
was released identical to0.2.2
and0.2.2
was yanked.scylla-cql 0.0.11
was released, the only changed from0.0.10
isscylla-macros
dependency bumped to0.3.0
.scylla 0.11.1
was released, the only change from0.11.0
is updating thescylla-cql
andscylla-macros
dependencies.0.11.0
was yanked.
Additionally, we published scylla-macros 0.2.3
, equivalent to 0.2.1
, to minimize breakage in existing projects.
v0.11.0
The ScyllaDB team is pleased to announce ScyllaDB Rust Driver 0.11.0,
an asynchronous CQL driver for Rust, optimized for Scylla, but also compatible with Apache Cassandra!
Some interesting statistics:
- over 1,018k downloads on crates; We passed a milion downloads!
- over 490 GitHub stars!
Notable changes
The main feature of this PR is refactor of serialization API. Old traits and structs (Value
, ValueList
, BatchValues
- renamed to LegacyBatchValues
, SerializedValues
- renamed to LegacySerializedValues
) are replaced by new ones (SerializeCql
, SerializeRow
, new BatchValues
, new SerializedValues
). There are wrappers and helper implementations provided, designed to aid in gradually migrating to new API - see the migration guide in the book for more information. Old traits and structs will be removed in one of future versions.
New serialization API has a benefit of type safety - now, if you use wrong type for a bind marker in a query, you will get an understandable error locally (without actually executing the query on the database) instead of cryptic deserialization error from Scylla, or worse - silent data corruption.
API cleanups / breaking changes:
New features / enhancements:
- Check count of batch statements locally and reject too long batches without contacting the server. This PR also changes some improper usages of
i16
tou16
(#824) - Implement
Default
forMaybeUnset
(#883)
Documentation:
- Updated Sphinx theme to 1.6 (#827)
- Removed usage of illegal consistency level in an example (#840)
- Removed redundant explicit link target in documentation (#848)
- Updated UDT example to be in line with docs (#849)
- Fixed a lot of typos (#876)
Bug fixes:
- Manually dereference
Option<&&str>
in one place to work around possible rustc bug (#838)
CI / developer tool improvements:
- Set workspace cargo resolver to version = 2 in order to get rid of annoying warning (#833)
- Improved error handling in test_coalescing (#834)
- Fix benchmarks compilation and compile them in CI to prevent further errors (#853)
- Use latest Cassandra version again, as the new version fixed the problem that made our tests fail (#850)
- Fix clippy new warning
needless_borrows_for_generic_args
(#861) - Added possibility to filter out control connection messages to the proxy (#863)
- Commited renamed Cargo.lock file to be used in MSRV testing (#856)
- Compile benchmarks when calling
make ci
so that developers can notice errors while testing locally (#877) - Pass the hostname of the container when checking for its health with
cqlsh
to unblock CI (#873)
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 |
---|---|
116 | Piotr Dulikowski |
67 | Karol Baryła |
5 | Jan Ciołek |
5 | Sylwia Szunejko |
1 | David Garcia |
1 | Mikhail Pogretskiy |
1 | Nick Sippl-Swezey |
1 | Oliver Bøving |
1 | RoDmitry |
1 | Samuel Orji |
1 | Yaniv Kaul |
v0.10.1
v0.9.1
v0.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
andLocalSerial
levels toConsistency
enum because those are valid levels for LWTSELECT
s.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 fromQuery
,PreparedStatement
andBatch
. (#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()
andfallback()
methods. Signature ofReplicaSet::choose_filtered()
is slightly changed (a reference is added topredicate
'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
andHashSet
with custom hashers. (#808) - Implemented serialization for
&[u8]
, which allows derivingValueList
for structs with&[u8]
fields. (#790) - Some performance optimisations by avoiding cloning. (#780)
- Moved
write_coalescing()
method fromSessionBuilder
toGenericSessionBuilder
as there is nothing preventing using it in Cloud. (#778) - Topology refresh interval is now configurable - see
cluster_metadata_refresh_interval
method onGenericSessionBuilder
. (#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
vsGenericSessionBuilder
) to preventCloudSessionBuilder
not getting the functionalities that it should. (#781)
Others:
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 |
---|---|
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 |
v0.9.0
The ScyllaDB team is pleased to announce ScyllaDB Rust Driver 0.9.0,
an asynchronous CQL driver for Rust, optimized for Scylla, but also compatible with Apache Cassandra!
Some interesting statistics:
- over 403k downloads on crates;
- over 440 GitHub stars!
Notable changes
API cleanups / breaking changes:
- Removed
Session::estimate_replicas_for_query
. The same effect can be achieved via slightly longersession.get_cluster_data().get_token_endpoints()
. (#768) - Removed
Session::get_tracing_info_custom
. The parameters passed to that function (number of retries, delay between retries, consistency level) can now be set on the per-session level basis, andget_tracing_info
should be used instead. (#768) - Removed accidental reexports of
Consistency
andSerialConsistency
from thescylla::statement::batch
module. Those are already available through more convenient import paths. (#767) - Removed the reexport of
QueryResult
fromscylla::transport::connection
module. It is already reexported from thescylla
module which should be more convenient. (#763) - Removed the
scylla::routing::Node
struct. It hasn't been used by any of our APIs and had a very similar name toscylla::transport::Node
, so it would only be a source of confusion if left alone any longer. (#762) - A bunch of constants have been un-pubbed from the
scylla-cql
crate, as well as two internal functions related to frame compression/decompression. (#764) - The
CloudConfig
struct has been exposed to the users. The purpose of this change is to aid in implementing Scylla Cloud support in thecpp-rust-driver
project. (#750) - It is now not possible to set the SSL context when using Rust driver with Scylla Cloud; the SSL context should be determined fully by the Scylla Cloud configuration and should not be modified by users. (#703)
New features / enhancements:
- In case when executing prepared queries, the partition key associated with the request is emitted in a
tokio::tracing
span in a human-readable form. Previously, it was also emitted, but in a form that is hard to parse by a human. (#766) - The function
Session::calculate_token_for_partition_key
is added. It allows to calculate a partition key only by using a partitioner and values of a partition key, noPreparedStatement
object is needed. (#757) - The
scale
parameter inLatencyAwarePolicy
, which is exposed in cpp driver but was missing from the rust implementation's API, is now exposed. The previous default value has been changed. (#733) - The documentation theme has been updated. (#737)
Bug fixes:
- The
RoutingInfo
struct to load balancing policies used to have incorrect consistency level set. This is now fixed, and a regression test has been added. (#743) - If one of the hostnames passed as a contact point cannot be resolved, the driver would fail to create a session, even if other nodes would resolve correctly. This is now fixed and the driver will succeed in such scenario. (#753)
CI / developer tool improvements:
- The timeout of CI jobs has been reduced from the default 6 hours to 1 hour. (#734)
Others:
- Non-public dependencies of the driver were updated. (#769, #755)
- The
clone.rs
example has been removed. It promoted bad practices; we recommend only using oneSession
object per application. (#728) - Uses of
SimpleStrategy
has been removed from examples and documentation. This strategy will become deprecated in ScyllaDB in the future, and we no longer want to promote its use in learning materials. (#726) - The runners in our CI has been temporarily downgraded to use Ubuntu 20.04. The reason for this change is that the
ccm
tool, used by the CI, requires Python 2 which is no longer available in the ubuntu-latest runner. Requirement for Python 2 will be dropped with the next ScyllaDB release, and the system version will be upgraded again after this happens. (#752) docker compose
version has been upgraded from V1 to V2 in the CI. The old one stopped receiving updates. (#761)
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 |
---|---|
20 | Piotr Dulikowski |
15 | Wojciech Przytuła |
11 | Piotr Grabowski |
3 | Jan Ciolek |
2 | David Garcia |
2 | Gor Stepanyan |
1 | Lucas Kent |
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
chrono
dependency no longer requires theoldtime
feature. That feature implies a transitive dependency ontime
crate 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=full
environment 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_policy
methods 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: