From 9e41524f8307270e7a6bb9cefe4981e3d18bc696 Mon Sep 17 00:00:00 2001 From: Jan Segre <jan@segre.in> Date: Mon, 10 Apr 2023 15:06:41 -0300 Subject: [PATCH] fix: remove block_cache_compressed for rocksdb-8.0.0 compatibility --- docs/tutorial/index.rst | 2 +- rocksdb/_rocksdb.pyx | 4 ---- rocksdb/table_factory.pxd | 1 - setup.cfg | 2 +- 4 files changed, 2 insertions(+), 7 deletions(-) diff --git a/docs/tutorial/index.rst b/docs/tutorial/index.rst index 1eb141a..58119a4 100644 --- a/docs/tutorial/index.rst +++ b/docs/tutorial/index.rst @@ -24,7 +24,7 @@ A more production ready open can look like this :: opts.table_factory = rocksdb.BlockBasedTableFactory( filter_policy=rocksdb.BloomFilterPolicy(10), block_cache=rocksdb.LRUCache(2 * (1024 ** 3)), - block_cache_compressed=rocksdb.LRUCache(500 * (1024 ** 2))) + ) db = rocksdb.DB("test.db", opts) diff --git a/rocksdb/_rocksdb.pyx b/rocksdb/_rocksdb.pyx index b678fc4..826146c 100644 --- a/rocksdb/_rocksdb.pyx +++ b/rocksdb/_rocksdb.pyx @@ -468,7 +468,6 @@ cdef class BlockBasedTableFactory(PyTableFactory): index_type='binary_search', checksum='crc32', PyCache block_cache=None, - PyCache block_cache_compressed=None, no_block_cache=False, block_size=None, block_size_deviation=None, @@ -497,9 +496,6 @@ cdef class BlockBasedTableFactory(PyTableFactory): if block_cache is not None: table_options.block_cache = block_cache.get_cache() - if block_cache_compressed is not None: - table_options.block_cache_compressed = block_cache_compressed.get_cache() - if no_block_cache: table_options.no_block_cache = True else: diff --git a/rocksdb/table_factory.pxd b/rocksdb/table_factory.pxd index 3ec8b7b..8beb48e 100644 --- a/rocksdb/table_factory.pxd +++ b/rocksdb/table_factory.pxd @@ -26,7 +26,6 @@ cdef extern from "rocksdb/table.h" namespace "rocksdb": int block_restart_interval cpp_bool whole_key_filtering shared_ptr[Cache] block_cache - shared_ptr[Cache] block_cache_compressed cpp_bool enable_index_compression cpp_bool cache_index_and_filter_blocks int format_version diff --git a/setup.cfg b/setup.cfg index 25c15a5..6e30ed6 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = rocksdb -version = 0.9.1 +version = 0.9.2 description = Python bindings for RocksDB long_description = file: README.rst long_description_content_type = text/x-rst -- GitLab