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

Is it possible to use read_options.pin_data when table_options.use_delta_encoding = true #12658

Open
pavel2003 opened this issue May 15, 2024 · 1 comment

Comments

@pavel2003
Copy link

https://github.com/facebook/rocksdb/wiki/Reducing-memcpy-overhead-when-using-Iterators

says pin_data rely on table_options.use_delta_encoding = false

we already have a workload with table_options.use_delta_encoding = true

is there any solution to pin data before iterator destroy

@ajkr
Copy link
Contributor

ajkr commented May 15, 2024

For key data, we don't have a solution. We use a transient buffer for decoding delta-encoded keys and there's currently no way for us to pin that transient buffer.

For value data, it looks like we do pin it when pin_data is set. I can update the wiki accordingly.

facebook-github-bot pushed a commit that referenced this issue May 16, 2024
Summary:
`ReadOptions::pin_data` already has the effect of pinning the `Slice` returned by `Iterator::value()` when the value is stored inline (e.g., `kTypeValue`). This PR adds a bit of visibility into that via a new `Iterator` property, "rocksdb.iterator.is-value-pinned", as well as some documentation and tests.

See also: #12658

Pull Request resolved: #12659

Reviewed By: cbi42

Differential Revision: D57391200

Pulled By: ajkr

fbshipit-source-id: 0caa8db27ca1aba86ee2addc3dfd6f0e003d32e2
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

No branches or pull requests

2 participants