scylla-rust-driver

Async CQL driver for Rust, optimized for ScyllaDB!

APACHE-2.0 License

Downloads
7M
Stars
576
Committers
42

Bot releases are visible (Hide)

scylla-rust-driver - v0.14.0 Latest Release

Published by Lorak-mmk about 1 month ago

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 in QueryResult.
    • 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)
  • Trait SerializeCql was renamed to SerializeValue because old name turned out to be confusing for users. (#1000)
  • Features chrono, time and secret were renamed to chrono-04, time-03 and secrecy-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 with PreparedStatement. (#1065)
  • Moved ResultMetadata.paging_state field to Rows.paging_state_response. This is because paging state is something that changes on each paged request and should not be cached by PreparedStatement. (#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 new SelfIdentity API in SessionBuilder. (#1039)
  • Replaced some .unwrap()s with .expect()s in the code generated by our derive macros. This is done to avoid angering unwrap_used clippy lint and to provide better error messages if those panics are ever triggered. (#1055)
    https://github.com/scylladb/scylla-rust-driver/pull/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:

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
scylla-rust-driver - v0.13.2

Published by wprzytula about 2 months ago

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 a PreparedStatement(#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:

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!

scylla-rust-driver - v0.13.1

Published by wprzytula 3 months ago

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 and log 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:

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!

scylla-rust-driver - v0.13.0

Published by Lorak-mmk 5 months ago

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 a Plan consisting of Nodes;
    now, together with a Node it can optionally specify the Shard 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 and strum_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 safe QueryResult::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 to rows_typed wherever possible. (#955)

CI / developer tool improvements:

  • Removed unreachable pubs (#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", as rust-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:

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
scylla-rust-driver - v0.12.0

Published by Lorak-mmk 9 months ago

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 of Uuid. 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 for num_bigint 0.4 is added. You can enable support for chosen version using num-bigint-03 / num-bigint-04 feature flags (#902)
  • bigdecimal dependency version is bumped to 0.4. Similarly to BigInt, usages of bigdecimal are now behind feature-flag bigdecimal-04 (#922)

New features / enhancements:

  • SerializeRow and SerializeCql derive macros now support skip field attribute to skip some fields during serialization (#903)

Documentation:

  • Documentation for SerializeRow / SerializeCql derive macros is now rendered only in scylla crate. Previously it was only visible in scylla-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 sharing Session objects between threads. You can find this section in Connecting to the cluster page of book (#914)

Bug fixes:

  • Some time-related were put behind chrono feature flag instead of time feature flag (#898)
  • chrono introduced an arguably breaking change - changing values of NaiveDate::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 in CONTRIBUTING.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 with mdbook we had a wrapper script that stripped those sections before calling mdbook. Now this script is replaced by preprocessor script called automatically by mdbook - so just calling mdbook 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:

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
scylla-rust-driver - v0.11.1

Published by Lorak-mmk 10 months ago

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: https://github.com/scylladb/scylla-rust-driver/issues/891

To solve this situation:

  • scylla-macros 0.3.0 was released identical to 0.2.2 and 0.2.2 was yanked.
  • scylla-cql 0.0.11 was released, the only changed from 0.0.10 is scylla-macros dependency bumped to 0.3.0.
  • scylla 0.11.1 was released, the only change from 0.11.0 is updating the scylla-cql and scylla-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.

scylla-rust-driver - v0.11.0

Published by Lorak-mmk 10 months ago

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:

  • Improved support of common time and date crates - thanks Anfid for contribution (745)

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 to u16 (#824)
  • Implement Default for MaybeUnset (#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:

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
scylla-rust-driver - v0.10.1

Published by Lorak-mmk about 1 year ago

Changes

  • Fixed a panic in LatencyAwarePolicy when 2 calls to Instant::now() returned the same value. (#830)
scylla-rust-driver - v0.9.1

Published by Lorak-mmk about 1 year ago

Changes

  • Fixed a panic in LatencyAwarePolicy when 2 calls to Instant::now() returned the same value. (#830)
scylla-rust-driver - v0.10.0

Published by piodul about 1 year ago

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
scylla-rust-driver - v0.9.0

Published by piodul about 1 year ago

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:

New features / enhancements:

Bug fixes:

CI / developer tool improvements:

Others:

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
20 Piotr Dulikowski
15 Wojciech Przytuła
11 Piotr Grabowski
3 Jan Ciolek
2 David Garcia
2 Gor Stepanyan
1 Lucas Kent
scylla-rust-driver - v0.8.2

Published by piodul over 1 year ago

Features:

Security fixes:

Bugfixes:

Enhancements:

scylla-rust-driver - v0.8.1

Published by piodul over 1 year ago

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:

  • Tests for the serverless support have been added. (#689, #694)
scylla-rust-driver - v0.8.0

Published by piodul over 1 year ago

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 BatchValues trait 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::Secret was added. To enable it, you need to enable the secret feature. (#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_token is now public. (#658)
  • Now, most of the error types in the crate implement the Clone trait. (#669)
  • The deser_cql_value function was made public. It is used by the scylla-rust-udf library. (#630)
  • Dropped dependency on ahash in 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-cql by 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 AddressTranslator to be more dynamic - for example, if a node's IP changes and all connections are closed, if the AddressTranslator reacts to this quickly then the driver can re-establish connections to this node much more quickly. (#641)

Bug fixes:

  • The Session::query_iter/execute_iter methods will now correctly work when used to send a write request. (#644)

Performance improvements:

  • The internal method Connection::query_all that was used to fetch cluster metadata has been replaced with Connection::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)
  • PreparedStatement is now cheaper to clone. Its internals that allocated on clone are now wrapped in an Arc. (#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 Makefile now 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:

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
scylla-rust-driver - v0.7.0

Published by piodul almost 2 years ago

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:

New features/enhancements:

CI / developer tools:

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
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
scylla-rust-driver - v0.6.1

Published by piodul about 2 years ago

  • Forgot to update the scylla-cql version from 0.0.1 to 0.0.2 in Cargo.toml which prevented 0.6.0 from being published to crates.io. The version 0.6.1 depends on scylla-cql 0.0.2, both of them were successfully pushed and are available on crates.io.
scylla-rust-driver - v0.6.0

Published by piodul about 2 years ago

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 batch method now returns QueryResult instead of BatchResult. 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_ignore parameter) 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:

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

scylla-rust-driver - v0.5.0

Published by psarna about 2 years ago

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:

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

scylla-rust-driver - v0.4.7

Published by psarna over 2 years ago

  • schema changes now wait for schema agreement by default, because it's never a bug to wait unnecesarily, while it is a bug not to wait at all - this behavior can be turned off manually
  • an example which traces the number of allocations per request is added
scylla-rust-driver - v0.4.6

Published by psarna over 2 years ago

  • 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.