1
0
Fork 0
mirror of https://github.com/ton-blockchain/ton synced 2025-03-09 15:40:10 +00:00

2 level index and filter for state ttl >= 30 days

This commit is contained in:
Marat S 2025-02-28 23:57:45 +00:00
parent 34f80e8f1b
commit 7f1ee5e9e1
3 changed files with 9 additions and 0 deletions

View file

@ -78,6 +78,12 @@ Result<RocksDb> RocksDb::open(std::string path, RocksDbOptions options) {
}
if (options.enable_bloom_filter) {
table_options.filter_policy.reset(rocksdb::NewBloomFilterPolicy(10, false));
if (options.two_level_index_and_filter) {
table_options.index_type = rocksdb::BlockBasedTableOptions::IndexType::kTwoLevelIndexSearch;
table_options.partition_filters = true;
table_options.cache_index_and_filter_blocks = true;
table_options.pin_l0_filter_and_index_blocks_in_cache = true;
}
}
db_options.table_factory.reset(rocksdb::NewBlockBasedTableFactory(table_options));