Skip to content
Commit 56865683 authored by dennis zhuang's avatar dennis zhuang Committed by yiwu-arbug
Browse files

(feat) Supports partitioned index filters settings for BlockBasedOptions (#294)

This PR exports more options in RocksDB `BlockBasedTableOptions`, because we want to use [Partitioned Index Filters](https://github.com/facebook/rocksdb/wiki/Partitioned-Index-Filters#how-to-use-it).

There is an issue [cache_index_and_filter_blocks causes Get slowdown](https://github.com/facebook/rocksdb/issues/3961) in rocksdb, and we test the recommend `Partitioned Index Filters` in java JNI binding, it works well.

So i think these options should be exported to rust-rocksdb users too.

The rocksdb log in test case `test_partitioned_index_filters` as below:

```
  cache_index_and_filter_blocks: 1
  cache_index_and_filter_blocks_with_high_priority: 1
  pin_l0_filter_and_index_blocks_in_cache: 1
  pin_top_level_index_and_filter: 1
  index_type: 2
  hash_index_allow_collision: 1
  checksum: 1
  no_block_cache: 0
  block_cache: 0x7ff4540060d0
  block_cache_name: LRUCache
  block_cache_options:
    capacity : 8388608
    num_shard_bits : 4
    strict_capacity_limit : 0
    memory_allocator : None
    high_pri_pool_ratio: 0.000
  block_cache_compressed: (nil)
  persistent_cache: (nil)
  block_size: 4096
  block_size_deviation: 10
  block_restart_interval: 16
  index_block_restart_interval: 1
  metadata_block_size: 4096
  partition_filters: 1
  use_delta_encoding: 1
  filter_policy: rocksdb.BuiltinBloomFilter
  whole_key_filtering: 1
  verify_compression: 0
  read_amp_bytes_per_bit: 0
  format_version: 2
  enable_index_compression: 1
  block_align: 0
```

It looks working.

Thanks you for this great project.
parent 9697bdfe
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment