Skip to content

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.

3 participants