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

Add refresh_iter to release pinned MemTable and SST #1212

Open
wants to merge 1 commit into
base: fb-mysql-8.0.28
Choose a base branch
from

Conversation

rockeet
Copy link
Contributor

@rockeet rockeet commented Aug 15, 2022

During long running trx, there is a rocksdb::Version object is referenced by iterator, thus the MemTables and SSTs referenced by Version can not be released even the MemTables are flushed or SSTs are compacted.

This PR is intended for releasing MemTable and SST objects held by
rocksdb::Version object which referenced by old rocksdb::Iterator, newly
created Iterator may reference a newer rocksdb::Version object, The data
view of these 2 iterators are identical.

@yoshinorim
Copy link
Contributor

I read the diff and I think it is better to submit as a RocksDB PR (https://github.com/facebook/rocksdb) as a read option or a wrapper of Iterator, rather than MyRocks specific functions. Would you mind filing an issue in RocksDB (https://github.com/facebook/rocksdb/issues) first and see feedbacks? Snapshot has to be carried over for consistent reads, and your diff looks to take into account that already.

@rockeet
Copy link
Contributor Author

rockeet commented Aug 17, 2022

I read the diff and I think it is better to submit as a RocksDB PR (https://github.com/facebook/rocksdb) as a read option or a wrapper of Iterator, rather than MyRocks specific functions. Would you mind filing an issue in RocksDB (https://github.com/facebook/rocksdb/issues) first and see feedbacks? Snapshot has to be carried over for consistent reads, and your diff looks to take into account that already.

Thank you, I have filed such a RocksDB issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants