diff --git a/rocksdb/_rocksdb.pyx b/rocksdb/_rocksdb.pyx index a6e2ce3..b643629 100644 --- a/rocksdb/_rocksdb.pyx +++ b/rocksdb/_rocksdb.pyx @@ -581,7 +581,9 @@ cdef class BlockBasedTableFactory(PyTableFactory): block_size_deviation=None, block_restart_interval=None, whole_key_filtering=None, - enable_index_compression=True): + enable_index_compression=False, + cache_index_and_filter_blocks=False + ): cdef table_factory.BlockBasedTableOptions table_options @@ -630,6 +632,12 @@ cdef class BlockBasedTableFactory(PyTableFactory): else: table_options.whole_key_filtering = False + if cache_index_and_filter_blocks is not None: + if cache_index_and_filter_blocks: + table_options.cache_index_and_filter_blocks = True + else: + table_options.cache_index_and_filter_blocks = False + if block_cache is not None: table_options.block_cache = block_cache.get_cache() @@ -1246,6 +1254,12 @@ cdef class ColumnFamilyOptions(object): def __set__(self, value): self.copts.optimize_filters_for_hits = value + property paranoid_file_checks: + def __get__(self): + return self.copts.paranoid_file_checks + def __set__(self, value): + self.copts.paranoid_file_checks = value + cdef class Options(ColumnFamilyOptions): cdef options.Options* opts cdef PyCache py_row_cache