Set PinL0FilterAndIndexBlocksInCache to true for rocksdb (#8855)

Signed-off-by: fishpenguin <kun.yu@zilliz.com>
pull/8855/merge
yukun 2021-10-08 10:19:06 +08:00 committed by GitHub
parent e7e481444b
commit d9115fe78d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -39,6 +39,7 @@ func NewRocksdbKV(name string) (*RocksdbKV, error) {
}
bbto := gorocksdb.NewDefaultBlockBasedTableOptions()
bbto.SetCacheIndexAndFilterBlocks(true)
bbto.SetPinL0FilterAndIndexBlocksInCache(true)
bbto.SetBlockCache(gorocksdb.NewLRUCache(LRUCacheSize))
opts := gorocksdb.NewDefaultOptions()
opts.SetBlockBasedTableFactory(bbto)