Releases: scylladb/scylla-rust-driver
v0.15.0
The ScyllaDB team is pleased to announce ScyllaDB Rust Driver 0.15.0,
an asynchronous CQL driver for Rust, optimized for Scylla, but also compatible with Apache Cassandra!
Some interesting statistics:
- over 2.516k downloads on crates!
- over 583 GitHub stars!
Changes
Beginning with this release, instead of putting all API-breaking changes into one group, now they are in the proper categories, but labeled as
Main changes:
New deserialization API
The main change in this release is the deserialization API refactor. Its primary goal was to reduce overhead caused by all rows being eagerly deserialized to type-erased CqlValue
type, only then being converted to end user types.
Old traits and structs (FromCqlVal
, FromRow
, QueryResult
- renamed to LegacyQueryResult
, RowIterator
- renamed to LegacyRowIterator
, TypedRowIterator
- renamed to LegacyTypedRowIterator
) are replaced by new ones (DeserializeValue
, DeserializeRow
, new QueryResult
, QueryPager
, TypedRowStream
). 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 increased efficiency - now, rows are deserialized straight to the end user type, without any copying and allocations on the way.
Another feature is the ability to deserialize rows to borrowed types (e.g. &str
or &[u8]
).
And the result metadata is now deserialized in the borrowed form, saving even more allocations.
The refactor included:
⚠️ [API-breaking] ParametrizedDeserialize{Value,Row}
with two lifetimes:'frame
and'metadata
separately (#1101).⚠️ [API-breaking] The deserialization refactor was finished (#1088, #1107, #1109, #1093, #1057, #1120, #1118, #1122, #1121).⚠️ [API-breaking] Unified macro attributes' syntax and semantics between serialization and deserialization derive macros (#1119).
Other changes by category:
New features / enhancements:
⚠️ [API-breaking] MadeResultMetadata
lifetime-generic, which paved a path to deserializing metadata in a borrowed way as an optimisation to save allocations (#1082).- Exported serialization migration macros that accidentally hadn't been exported before (#1089).
- Exposed public getters to type-erased errors (#1087).
- Trace message is now issued upon successful keepalive (#1092).
- Added
SerializeRow
impl forBox<T: SerializeRow>
(#1105). - Exposed public getters for execution profile configuration (#1104).
- Allowed public access to the profile associated with an execution profile handle (#1112).
Bug fixes:
⚠️ [API-breaking] Fixed driver's logic that bases on error variants returned from query execution (#1075).- Fixed possible panic in speculative execution (#1086)
⚠️ [API-breaking] Disallowed deserializing Counter type to plaini64
for type safety (#1106).- Fixed logic about ignoring particular error kinds if speculative execution failed (#1124).
API cleanups / better types:
⚠️ [API-breaking] Some of our error types were restructured to be more strongly typed (instead of just containing a string) and better reflect the conditions that they appear in. This work will be continued in 0.16. (#1067, #1074, #1054, #1080, #1080, #1117).- Removed wildcard re-exports of the serialization framework's entities (#1090).
⚠️ [API-breaking] MadeRetryPolicy
stored behindArc
instead ofBox
(#1103).
Internal API cleanups/refactors:
- Removed paging state parameter from unpaged raw
Connection
's API (#1084). ⚠️ [API-breaking] Fixed unnameable types in our codebase (by making them exposed, unexposing them or deleting them at all) and enabled theunnameable_types
clippy lint to prevent having such situation in the future (#1094).- Tiny optimizations and code refactors (#1108).
Documentation:
CI / developer tool improvements:
- clippy was appeased again (#1072, #1077, #1095).
- Pinned Rust version in
book.yml
CI workflow (#1096).
Others:
- Rewritten RELEASE.md, so that it now contains up-to-date guide about maintaining and releasing the driver (#1076).
- Bumped MSRV to 1.70 (#1098).
- Added an example showing Counter UPDATE (#1100).
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 |
---|---|
154 | Mikołaj Uzarski |
89 | Wojciech Przytuła |
45 | Karol Baryła |
26 | Piotr Dulikowski |
3 | David Garcia |
1 | Daniel Boll |
1 | Alex Pozhylenkov |
v0.14.0
The ScyllaDB team is pleased to announce ScyllaDB Rust Driver 0.14.0,
an asynchronous CQL driver for Rust, optimized for Scylla, but also compatible with Apache Cassandra!
Some interesting statistics:
- over 2.103k downloads on crates!
- over 556 GitHub stars!
Changes
API cleanups / breaking changes:
- Our session & paging API was revamped so that it is more intuitive and robust. Now the type of the query (paged / unpaged) is tied to the method used to execute it (
execute_unpaged
/execute_single_page
/execute_iter
) rather than the page size associated with the statement object. Other changes include (#1061):- Introduced strongly typed paging state instead of using
Bytes
. - Paging state is explicitly returned from
execute_single_page
instead of being a field inQueryResult
. - Made
page_size
on the statements mandatory and providing the default value. - Updated our docs and examples to point users towards paged queries and explaining the issues with unpaged SELECTs. (#1069, #1068)
- Introduced strongly typed paging state instead of using
- Trait
SerializeCql
was renamed toSerializeValue
because old name turned out to be confusing for users. (#1000) - Features
chrono
,time
andsecret
were renamed tochrono-04
,time-03
andsecrecy-08
to allow us to support new major versions of those libraries in the future. (#939) - Some of our error types were restructured to be more strongly typed (instead of just containing a string) and better reflect the conditions that they appear in. This work will be continued in 0.15. (#1017, #1026)
QueryResult.col_specs
was changed from being a field to a method in order to allow sharing it withPreparedStatement
. (#1065)- Moved
ResultMetadata.paging_state
field toRows.paging_state_response
. This is because paging state is something that changes on each paged request and should not be cached byPreparedStatement
. (#1065) - Some parts of our upcoming deserialization refactor were merged, resulting in very minor breaking changes in our error types. The rest of deserialization refactor is planned for 0.15. (#970, #1004, #1024, #1065)
New features / enhancements:
- Values that driver sends to server to identify itself in
STARTUP
message (DRIVER_NAME
,DRIVER_VERSION
) can now be configured using newSelfIdentity
API inSessionBuilder
. (#1039) - Replaced some
.unwrap()
s with.expect()
s in the code generated by our derive macros. This is done to avoid angeringunwrap_used
clippy lint and to provide better error messages if those panics are ever triggered. (#1055)
#1019
Documentation:
- Documentation about using timeuuid type was improved. (#980)
- Improved documentation about
PreparedStatement
. (#986) - Updated Scylla Sphinx theme to version 1.7. (#994)
- Added support for building documentation on Mac. (#927)
CI / developer tool improvements:
- #1011 fixed some issue with tests and CI:
- CI now prints versions of used Rust tools so we don't have to wonder what version is running on Github Actions runners again.
- Disabled tablets in tests that use LWT because Scylla doesn't support it yet, and other minor tablet-related changes.
- Restricted Tokio version because of regression when
[tokio::test]
is used with[ntest::timeout]
- #1019 removed aforementioned Tokio version bounds after regression was fixed there.
- Clippy lints that were previously skipped in two places are enabled again because Darling crate that was triggering them was fixed. (#1036)
Others:
- Updated maintainers list in
CONTRIBUTING.md
. (#997)
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 |
---|---|
163 | Wojciech Przytuła |
55 | Mikołaj Uzarski |
17 | Karol Baryła |
3 | David Garcia |
2 | Lucas Kent |
2 | Piotr Dulikowski |
1 | Daniel Reis |
1 | Dmitry Kropachev |
1 | Kailokk |
v0.13.2
The ScyllaDB team is pleased to announce ScyllaDB Rust Driver 0.13.2,
an asynchronous CQL driver for Rust, optimized for Scylla, but also compatible with Apache Cassandra!
Some interesting statistics:
- over 2,080k downloads on crates!
- over 554 GitHub stars!
Changes
Bug fixes:
- Made driver issue a warning and continue instead of failing if an invalid peer is encountered in system tables (#1045)
- Fixed bug that paged queries would be broken when the recently introduced
use_cached_metadata
flag was set on aPreparedStatement
(#1063)
Documentation:
- Documented
DefaultPolicy
(Load Balancing) with a lot of comments intended for developers to understand its logic easier (#1062)
CI / developer tool improvements:
- Appeased Clippy again (#1046)
- Turned tablets off for Counter tests, as tablets do not support Counters yet (#1060)
- Added scylla_cloud_tests to
cfg
allowlist (after such allowlist was made mandatory) (#1049) - Fixed semver-checks failure after its unexpected breaking update (#1050, #1051)
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!
v0.13.1
The ScyllaDB team is pleased to announce ScyllaDB Rust Driver 0.13.1,
an asynchronous CQL driver for Rust, optimized for Scylla, but also compatible with Apache Cassandra!
Some interesting statistics:
- over 1,905k downloads on crates!
- over 545 GitHub stars!
Changes
Bug fixes:
- Made
log
logger work with the driver again (#992) - Fixed bug that Batches would be always sent as LOGGED if they contain any unprepared statement (
Query
) (#1038) - Fixed two efficiency-related bugs in default load balancing policy (#1037)
Documentation:
- Documented logging with
tracing
andlog
libraries and provided an example (#992)
CI / developer tool improvements:
- Silenced mock structs unused warning (#996)
- Appeased Clippy again (#1002 and #1013)
- Turned tablets off for LWT tests, as tablets do not support LWT yet (d20aed54)
- Made LWT tests ignored when testing with tablets, as tablets do not support LWT yet (2bd45560)
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!
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 |