未验证 提交 e85cbea1 编写于 作者: Y yukun 提交者: GitHub

Set CacheIndexAndFilterBlocks to true for rocksdb (#8851)

Signed-off-by: Nfishpenguin <kun.yu@zilliz.com>
上级 167069c8
......@@ -33,6 +33,7 @@ func NewRocksdbKV(name string) (*RocksdbKV, error) {
return nil, errors.New("rocksdb name is nil")
}
bbto := gorocksdb.NewDefaultBlockBasedTableOptions()
bbto.SetCacheIndexAndFilterBlocks(true)
bbto.SetBlockCache(gorocksdb.NewLRUCache(3 << 30))
opts := gorocksdb.NewDefaultOptions()
opts.SetBlockBasedTableFactory(bbto)
......
......@@ -118,6 +118,7 @@ type rocksmq struct {
// 3. Start retention goroutine
func NewRocksMQ(name string, idAllocator allocator.GIDAllocator) (*rocksmq, error) {
bbto := gorocksdb.NewDefaultBlockBasedTableOptions()
bbto.SetCacheIndexAndFilterBlocks(true)
bbto.SetBlockCache(gorocksdb.NewLRUCache(RocksDBLRUCacheCapacity))
opts := gorocksdb.NewDefaultOptions()
opts.SetBlockBasedTableFactory(bbto)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册