tikv / rocksdb

A library that provides an embeddable, persistent key-value store for fast storage.
http://rocksdb.org
GNU General Public License v2.0
120 stars 93 forks source link

Get table prop from table cache without IO #355

Closed v01dstar closed 1 month ago

v01dstar commented 9 months ago

I confirmed with the author that the change no_io = false made in https://github.com/tikv/rocksdb/pull/211 was not intended as the PR description suggested.

If no_io is set to true, TableCache would not load the table and add it to the cache, when the table does not exist in the cache already, instead, the caller (in this case, Version which is then called by compaction) is responsible to load the table properties without affecting the cache. Since compaction is an one-off operation (from SST's perspective), it makes more sense to set no_io to true here.