Skip to content

cargo: update rust-driver to 0.14 #160

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Sep 6, 2024
Merged

Conversation

muzarski
Copy link
Collaborator

@muzarski muzarski commented Sep 6, 2024

This PR updates the rust-driver dependency to 0.14.

There were some minor API breaking changes such as renaming SerializeCql to SerializeValue.

The most troublesome matter were paging changes in rust driver. We needed to adjust cpp-rust-driver to new paging API introduced in rust-driver:

  • change paging state type from Bytes to PagingState
  • contain a PagingStateResponse in CassResult instead of Bytes.
  • handle disabling paging on a cpp-rust-driver layer. The Query/PreparedStatement::disable_paging() methods were removed. As a replacement, query/execute_single_page and query/execute_unpaged session methods were introduced. We needed to adjust the cpp-rust-driver to this change by introducing a paging_enabled flag in CassStatement.

Pre-review checklist

  • I have split my patch into logically separate commits.
  • All commit messages clearly explain what they change and why.
  • PR description sums up the changes and reasons why they should be introduced.
  • [ ] I have enabled appropriate tests in .github/workflows/build.yml in gtest_filter.
  • [ ] I have enabled appropriate tests in .github/workflows/cassandra.yml in gtest_filter.

There were some API breaking changes in the most recent release of rust-driver.
These issues were addressed in the commit.

NOTE: Changes regarding disabling paging are addressed in a following
commit just for better review experience. It requires some changes
to the code which would introduce unnecessary noise here.
Since `[Query/PreparedStatement]::disable_paging()` method was removed
in 0.14, we need to move this flag to the cpp-rust-driver layer.

Based on the value of this flag, we call either `[query/execute]_single_page` or
`[query/execute]_unpaged`.

By default, all statements/queries have paging disabled (as in cpp-driver).
@muzarski muzarski self-assigned this Sep 6, 2024
This is the behaviour of cpp-driver.
@muzarski muzarski requested a review from dkropachev September 6, 2024 17:04
@dkropachev dkropachev merged commit d349cc8 into scylladb:master Sep 6, 2024
5 checks passed
@muzarski muzarski mentioned this pull request Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants