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
Feature Request: Iterator::Refresh() with a snapshot #10487
Comments
I see the current rocksdb/db/arena_wrapped_db_iter.cc Lines 62 to 82 in f28d0c2
So supporting iterator refresh to a new snapshot might only get performance benefit when superversion number is not changed. Is that the performance improvement you expected? Or you expect some improvements could be done when superversion changes too? |
I seeked for a feature to avoid creating new iterator when I need to update an iterator to a specified snapshot, then I found Refresh, I expect Refresh is much lighter than creating new iterator. As an online service, super version change should be much less frequent than snapshot change, so Refresh with snapshot is much lighter in most cases. If super version is really changed, with carefully coding, the Refresh computation should be still lighter than creating a new iterator. |
Hi @rockeet, I agree this is a reasonable feature to add, and optimizing the part where superversion is not changed should be easier to implement. It's not planned yet, so I'll leave it as up-for-grabs for now. |
Very Thanks! |
Current Iterator::Refresh() does not support snapshot, we have no way to refresh an iterator to a specified snapshot, instead we create a new iterator, but creating new iterator is heavy.
Refresh iterator to a specified snapshot, we can avoid creating new iterator thus improving performance.
The text was updated successfully, but these errors were encountered: