Skip to content
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

Revert "Don’t hold onto ReadOptions.inner when iterating" #661

Merged
merged 1 commit into from Jul 25, 2022

Conversation

mina86
Copy link
Contributor

@mina86 mina86 commented Jul 20, 2022

Turns out there’s a two-step reference chain for lower and upper bound.
The C++ ReadOptions refer slices inside of the rocksdb_readoptions_t
C wrapper which refer to Rust vectors. Holding onto the vectors is
insufficient for all the references to be valid.

This reverts commit 947e4b6.

Fixes: #660

Turns out there’s a two-step reference chain for lower and upper bound.
The C++ ReadOptions refer slices inside of the rocksdb_readoptions_t
C wrapper which refer to Rust vectors.   Holding onto the vectors is
insufficient for all the references to be valid.

This reverts commit 947e4b6.

Fixes: rust-rocksdb#660
@niklasf
Copy link
Contributor

niklasf commented Jul 20, 2022

Confirmed that this fixes #660 as expected. Thanks for the super quick response.

@stanislav-tkach stanislav-tkach requested a review from aleksuss Jul 20, 2022
@stanislav-tkach
Copy link
Contributor

stanislav-tkach commented Jul 20, 2022

I had some doubts about that, but then I thought: the tests passed, so everything should be OK... 🙃

@aleksuss aleksuss merged commit 06ba073 into rust-rocksdb:master Jul 25, 2022
6 checks passed
@mina86 mina86 deleted the revert branch Jul 25, 2022
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.

4 participants