rdbpython 0.2.2__tar.gz → 0.2.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {rdbpython-0.2.2/src/rdbpython.egg-info → rdbpython-0.2.4}/PKG-INFO +7 -7
- {rdbpython-0.2.2 → rdbpython-0.2.4}/README.md +2 -2
- {rdbpython-0.2.2 → rdbpython-0.2.4}/pyproject.toml +5 -5
- {rdbpython-0.2.2 → rdbpython-0.2.4}/src/rdbpy/lib_rocksdb.pyx +62 -9
- {rdbpython-0.2.2 → rdbpython-0.2.4}/src/rdbpy/table_factory.pxd +9 -0
- {rdbpython-0.2.2 → rdbpython-0.2.4/src/rdbpython.egg-info}/PKG-INFO +7 -7
- {rdbpython-0.2.2 → rdbpython-0.2.4}/tests/conftest.py +0 -2
- {rdbpython-0.2.2 → rdbpython-0.2.4}/LICENSE.md +0 -0
- {rdbpython-0.2.2 → rdbpython-0.2.4}/MANIFEST.in +0 -0
- {rdbpython-0.2.2 → rdbpython-0.2.4}/scripts/build-rocksdb-linux.sh +0 -0
- {rdbpython-0.2.2 → rdbpython-0.2.4}/scripts/build-rocksdb-macos.sh +0 -0
- {rdbpython-0.2.2 → rdbpython-0.2.4}/scripts/rocksdb-cstdint.patch +0 -0
- {rdbpython-0.2.2 → rdbpython-0.2.4}/setup.cfg +0 -0
- {rdbpython-0.2.2 → rdbpython-0.2.4}/setup.py +0 -0
- {rdbpython-0.2.2 → rdbpython-0.2.4}/src/rdbpy/__init__.py +0 -0
- {rdbpython-0.2.2 → rdbpython-0.2.4}/src/rdbpy/backup.pxd +0 -0
- {rdbpython-0.2.2 → rdbpython-0.2.4}/src/rdbpy/cache.pxd +0 -0
- {rdbpython-0.2.2 → rdbpython-0.2.4}/src/rdbpy/comparator.pxd +0 -0
- {rdbpython-0.2.2 → rdbpython-0.2.4}/src/rdbpy/db.pxd +0 -0
- {rdbpython-0.2.2 → rdbpython-0.2.4}/src/rdbpy/env.pxd +0 -0
- {rdbpython-0.2.2 → rdbpython-0.2.4}/src/rdbpy/errors.py +0 -0
- {rdbpython-0.2.2 → rdbpython-0.2.4}/src/rdbpy/filter_policy.pxd +0 -0
- {rdbpython-0.2.2 → rdbpython-0.2.4}/src/rdbpy/include/rdb_include/comparator_wrapper.hpp +0 -0
- {rdbpython-0.2.2 → rdbpython-0.2.4}/src/rdbpy/include/rdb_include/filter_policy_wrapper.hpp +0 -0
- {rdbpython-0.2.2 → rdbpython-0.2.4}/src/rdbpy/include/rdb_include/memtable_factories.hpp +0 -0
- {rdbpython-0.2.2 → rdbpython-0.2.4}/src/rdbpy/include/rdb_include/merge_operator_wrapper.hpp +0 -0
- {rdbpython-0.2.2 → rdbpython-0.2.4}/src/rdbpy/include/rdb_include/slice_transform_wrapper.hpp +0 -0
- {rdbpython-0.2.2 → rdbpython-0.2.4}/src/rdbpy/include/rdb_include/utils.hpp +0 -0
- {rdbpython-0.2.2 → rdbpython-0.2.4}/src/rdbpy/include/rdb_include/write_batch_iter_helper.hpp +0 -0
- {rdbpython-0.2.2 → rdbpython-0.2.4}/src/rdbpy/interfaces.py +0 -0
- {rdbpython-0.2.2 → rdbpython-0.2.4}/src/rdbpy/iterator.pxd +0 -0
- {rdbpython-0.2.2 → rdbpython-0.2.4}/src/rdbpy/lib_rocksdb.pxd +0 -0
- {rdbpython-0.2.2 → rdbpython-0.2.4}/src/rdbpy/lib_rocksdb.pyi +0 -0
- {rdbpython-0.2.2 → rdbpython-0.2.4}/src/rdbpy/lib_utils.py +0 -0
- {rdbpython-0.2.2 → rdbpython-0.2.4}/src/rdbpy/logger.pxd +0 -0
- {rdbpython-0.2.2 → rdbpython-0.2.4}/src/rdbpy/memtablerep.pxd +0 -0
- {rdbpython-0.2.2 → rdbpython-0.2.4}/src/rdbpy/merge_operator.pxd +0 -0
- {rdbpython-0.2.2 → rdbpython-0.2.4}/src/rdbpy/merge_operators.py +0 -0
- {rdbpython-0.2.2 → rdbpython-0.2.4}/src/rdbpy/options.pxd +0 -0
- {rdbpython-0.2.2 → rdbpython-0.2.4}/src/rdbpy/slice_.pxd +0 -0
- {rdbpython-0.2.2 → rdbpython-0.2.4}/src/rdbpy/slice_transform.pxd +0 -0
- {rdbpython-0.2.2 → rdbpython-0.2.4}/src/rdbpy/snapshot.pxd +0 -0
- {rdbpython-0.2.2 → rdbpython-0.2.4}/src/rdbpy/status.pxd +0 -0
- {rdbpython-0.2.2 → rdbpython-0.2.4}/src/rdbpy/std_memory.pxd +0 -0
- {rdbpython-0.2.2 → rdbpython-0.2.4}/src/rdbpy/transaction.pxd +0 -0
- {rdbpython-0.2.2 → rdbpython-0.2.4}/src/rdbpy/universal_compaction.pxd +0 -0
- {rdbpython-0.2.2 → rdbpython-0.2.4}/src/rdbpython.egg-info/SOURCES.txt +0 -0
- {rdbpython-0.2.2 → rdbpython-0.2.4}/src/rdbpython.egg-info/dependency_links.txt +0 -0
- {rdbpython-0.2.2 → rdbpython-0.2.4}/src/rdbpython.egg-info/not-zip-safe +0 -0
- {rdbpython-0.2.2 → rdbpython-0.2.4}/src/rdbpython.egg-info/requires.txt +0 -0
- {rdbpython-0.2.2 → rdbpython-0.2.4}/src/rdbpython.egg-info/top_level.txt +0 -0
- {rdbpython-0.2.2 → rdbpython-0.2.4}/tests/functional/__init__.py +0 -0
- {rdbpython-0.2.2 → rdbpython-0.2.4}/tests/functional/test_db.py +0 -0
- {rdbpython-0.2.2 → rdbpython-0.2.4}/tests/functional/test_memtable.py +0 -0
- {rdbpython-0.2.2 → rdbpython-0.2.4}/tests/functional/test_options.py +0 -0
- {rdbpython-0.2.2 → rdbpython-0.2.4}/tests/functional/test_transaction.py +0 -0
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: rdbpython
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.4
|
|
4
4
|
Summary: Python bindings for RocksDB with Cython
|
|
5
5
|
Author-email: Gor Arakelyan <gorarkln@gmail.com>
|
|
6
6
|
Maintainer-email: Gor Arakelyan <gorarkln@gmail.com>
|
|
7
7
|
License-Expression: MIT
|
|
8
|
-
Project-URL: Homepage, https://github.com/
|
|
9
|
-
Project-URL: Documentation, https://github.com/
|
|
10
|
-
Project-URL: Repository, https://github.com/
|
|
11
|
-
Project-URL: Issues, https://github.com/
|
|
8
|
+
Project-URL: Homepage, https://github.com/nustackdev/rdbpy
|
|
9
|
+
Project-URL: Documentation, https://github.com/nustackdev/rdbpy#readme
|
|
10
|
+
Project-URL: Repository, https://github.com/nustackdev/rdbpy
|
|
11
|
+
Project-URL: Issues, https://github.com/nustackdev/rdbpy/issues
|
|
12
12
|
Project-URL: PyPI, https://pypi.org/project/rdbpython/
|
|
13
13
|
Keywords: rocksdb,database,key-value,storage,embedded,cython
|
|
14
14
|
Classifier: Development Status :: 3 - Alpha
|
|
@@ -46,8 +46,8 @@ Dynamic: license-file
|
|
|
46
46
|
|
|
47
47
|
# rdbpy
|
|
48
48
|
|
|
49
|
-
[](https://github.com/nustackdev/rdbpy/actions/workflows/build.yml)
|
|
50
|
+
[](https://github.com/nustackdev/rdbpy/actions/workflows/test.yml)
|
|
51
51
|
[](https://pypi.org/project/rdbpython/)
|
|
52
52
|
[](https://pypi.org/project/rdbpython/)
|
|
53
53
|
[](https://opensource.org/licenses/MIT)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# rdbpy
|
|
2
2
|
|
|
3
|
-
[](https://github.com/nustackdev/rdbpy/actions/workflows/build.yml)
|
|
4
|
+
[](https://github.com/nustackdev/rdbpy/actions/workflows/test.yml)
|
|
5
5
|
[](https://pypi.org/project/rdbpython/)
|
|
6
6
|
[](https://pypi.org/project/rdbpython/)
|
|
7
7
|
[](https://opensource.org/licenses/MIT)
|
|
@@ -10,7 +10,7 @@ build-backend = "setuptools.build_meta"
|
|
|
10
10
|
# ============================================================================
|
|
11
11
|
[project]
|
|
12
12
|
name = "rdbpython"
|
|
13
|
-
version = "0.2.
|
|
13
|
+
version = "0.2.4"
|
|
14
14
|
description = "Python bindings for RocksDB with Cython"
|
|
15
15
|
readme = "README.md"
|
|
16
16
|
license = "MIT"
|
|
@@ -47,10 +47,10 @@ requires-python = ">=3.9"
|
|
|
47
47
|
dependencies = []
|
|
48
48
|
|
|
49
49
|
[project.urls]
|
|
50
|
-
Homepage = "https://github.com/
|
|
51
|
-
Documentation = "https://github.com/
|
|
52
|
-
Repository = "https://github.com/
|
|
53
|
-
Issues = "https://github.com/
|
|
50
|
+
Homepage = "https://github.com/nustackdev/rdbpy"
|
|
51
|
+
Documentation = "https://github.com/nustackdev/rdbpy#readme"
|
|
52
|
+
Repository = "https://github.com/nustackdev/rdbpy"
|
|
53
|
+
Issues = "https://github.com/nustackdev/rdbpy/issues"
|
|
54
54
|
PyPI = "https://pypi.org/project/rdbpython/"
|
|
55
55
|
|
|
56
56
|
[project.optional-dependencies]
|
|
@@ -591,7 +591,16 @@ cdef class BlockBasedTableFactory(PyTableFactory):
|
|
|
591
591
|
block_size=None,
|
|
592
592
|
block_size_deviation=None,
|
|
593
593
|
block_restart_interval=None,
|
|
594
|
-
whole_key_filtering=None
|
|
594
|
+
whole_key_filtering=None,
|
|
595
|
+
cache_index_and_filter_blocks=None,
|
|
596
|
+
cache_index_and_filter_blocks_with_high_priority=None,
|
|
597
|
+
pin_l0_filter_and_index_blocks_in_cache=None,
|
|
598
|
+
pin_top_level_index_and_filter=None,
|
|
599
|
+
partition_filters=None,
|
|
600
|
+
metadata_block_size=None,
|
|
601
|
+
format_version=None,
|
|
602
|
+
optimize_filters_for_memory=None,
|
|
603
|
+
read_amp_bytes_per_bit=None):
|
|
595
604
|
|
|
596
605
|
cdef table_factory.BlockBasedTableOptions table_options
|
|
597
606
|
|
|
@@ -635,6 +644,37 @@ cdef class BlockBasedTableFactory(PyTableFactory):
|
|
|
635
644
|
else:
|
|
636
645
|
table_options.whole_key_filtering = False
|
|
637
646
|
|
|
647
|
+
if cache_index_and_filter_blocks is not None:
|
|
648
|
+
table_options.cache_index_and_filter_blocks = bool(cache_index_and_filter_blocks)
|
|
649
|
+
|
|
650
|
+
if cache_index_and_filter_blocks_with_high_priority is not None:
|
|
651
|
+
table_options.cache_index_and_filter_blocks_with_high_priority = bool(
|
|
652
|
+
cache_index_and_filter_blocks_with_high_priority
|
|
653
|
+
)
|
|
654
|
+
|
|
655
|
+
if pin_l0_filter_and_index_blocks_in_cache is not None:
|
|
656
|
+
table_options.pin_l0_filter_and_index_blocks_in_cache = bool(
|
|
657
|
+
pin_l0_filter_and_index_blocks_in_cache
|
|
658
|
+
)
|
|
659
|
+
|
|
660
|
+
if pin_top_level_index_and_filter is not None:
|
|
661
|
+
table_options.pin_top_level_index_and_filter = bool(pin_top_level_index_and_filter)
|
|
662
|
+
|
|
663
|
+
if partition_filters is not None:
|
|
664
|
+
table_options.partition_filters = bool(partition_filters)
|
|
665
|
+
|
|
666
|
+
if metadata_block_size is not None:
|
|
667
|
+
table_options.metadata_block_size = metadata_block_size
|
|
668
|
+
|
|
669
|
+
if format_version is not None:
|
|
670
|
+
table_options.format_version = format_version
|
|
671
|
+
|
|
672
|
+
if optimize_filters_for_memory is not None:
|
|
673
|
+
table_options.optimize_filters_for_memory = bool(optimize_filters_for_memory)
|
|
674
|
+
|
|
675
|
+
if read_amp_bytes_per_bit is not None:
|
|
676
|
+
table_options.read_amp_bytes_per_bit = read_amp_bytes_per_bit
|
|
677
|
+
|
|
638
678
|
if block_cache is not None:
|
|
639
679
|
table_options.block_cache = block_cache.get_cache()
|
|
640
680
|
|
|
@@ -2642,10 +2682,19 @@ cdef class Transaction(object):
|
|
|
2642
2682
|
self.closed = True
|
|
2643
2683
|
|
|
2644
2684
|
def __dealloc__(self):
|
|
2645
|
-
#
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2685
|
+
# RocksDB's BeginTransaction returns a heap-allocated Transaction*
|
|
2686
|
+
# that the caller owns. Commit() and Rollback() do NOT delete the
|
|
2687
|
+
# object - we must `del` it explicitly. Without this, every
|
|
2688
|
+
# committed/rolled-back transaction leaks its WriteBatch and
|
|
2689
|
+
# tracking state.
|
|
2690
|
+
cdef transaction.Transaction* tmp = self.txn
|
|
2691
|
+
if tmp != NULL:
|
|
2692
|
+
if not self.closed:
|
|
2693
|
+
with nogil:
|
|
2694
|
+
tmp.Rollback()
|
|
2695
|
+
with nogil:
|
|
2696
|
+
del tmp
|
|
2697
|
+
self.txn = NULL
|
|
2649
2698
|
|
|
2650
2699
|
cpdef void close(self):
|
|
2651
2700
|
"""Close the transaction by rolling it back."""
|
|
@@ -2662,10 +2711,12 @@ cdef class Transaction(object):
|
|
|
2662
2711
|
cpdef void commit(self):
|
|
2663
2712
|
self._ensure_open()
|
|
2664
2713
|
cdef Status st
|
|
2714
|
+
cdef transaction.Transaction* tmp = self.txn
|
|
2665
2715
|
with nogil:
|
|
2666
|
-
st =
|
|
2716
|
+
st = tmp.Commit()
|
|
2717
|
+
del tmp
|
|
2667
2718
|
self.closed = True
|
|
2668
|
-
self.txn = NULL
|
|
2719
|
+
self.txn = NULL
|
|
2669
2720
|
check_status(st)
|
|
2670
2721
|
|
|
2671
2722
|
cpdef void rollback(self):
|
|
@@ -2674,10 +2725,12 @@ cdef class Transaction(object):
|
|
|
2674
2725
|
if self.txn == NULL:
|
|
2675
2726
|
return
|
|
2676
2727
|
cdef Status st
|
|
2728
|
+
cdef transaction.Transaction* tmp = self.txn
|
|
2677
2729
|
with nogil:
|
|
2678
|
-
st =
|
|
2730
|
+
st = tmp.Rollback()
|
|
2731
|
+
del tmp
|
|
2679
2732
|
self.closed = True
|
|
2680
|
-
self.txn = NULL
|
|
2733
|
+
self.txn = NULL
|
|
2681
2734
|
check_status(st)
|
|
2682
2735
|
|
|
2683
2736
|
cpdef void prepare(self):
|
|
@@ -27,6 +27,15 @@ cdef extern from "rocksdb/table.h" namespace "rocksdb":
|
|
|
27
27
|
int block_size_deviation
|
|
28
28
|
int block_restart_interval
|
|
29
29
|
cpp_bool whole_key_filtering
|
|
30
|
+
cpp_bool cache_index_and_filter_blocks
|
|
31
|
+
cpp_bool cache_index_and_filter_blocks_with_high_priority
|
|
32
|
+
cpp_bool pin_l0_filter_and_index_blocks_in_cache
|
|
33
|
+
cpp_bool pin_top_level_index_and_filter
|
|
34
|
+
cpp_bool partition_filters
|
|
35
|
+
size_t metadata_block_size
|
|
36
|
+
uint32_t format_version
|
|
37
|
+
cpp_bool optimize_filters_for_memory
|
|
38
|
+
int read_amp_bytes_per_bit
|
|
30
39
|
shared_ptr[Cache] block_cache
|
|
31
40
|
shared_ptr[Cache] block_cache_compressed
|
|
32
41
|
shared_ptr[FilterPolicy] filter_policy
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: rdbpython
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.4
|
|
4
4
|
Summary: Python bindings for RocksDB with Cython
|
|
5
5
|
Author-email: Gor Arakelyan <gorarkln@gmail.com>
|
|
6
6
|
Maintainer-email: Gor Arakelyan <gorarkln@gmail.com>
|
|
7
7
|
License-Expression: MIT
|
|
8
|
-
Project-URL: Homepage, https://github.com/
|
|
9
|
-
Project-URL: Documentation, https://github.com/
|
|
10
|
-
Project-URL: Repository, https://github.com/
|
|
11
|
-
Project-URL: Issues, https://github.com/
|
|
8
|
+
Project-URL: Homepage, https://github.com/nustackdev/rdbpy
|
|
9
|
+
Project-URL: Documentation, https://github.com/nustackdev/rdbpy#readme
|
|
10
|
+
Project-URL: Repository, https://github.com/nustackdev/rdbpy
|
|
11
|
+
Project-URL: Issues, https://github.com/nustackdev/rdbpy/issues
|
|
12
12
|
Project-URL: PyPI, https://pypi.org/project/rdbpython/
|
|
13
13
|
Keywords: rocksdb,database,key-value,storage,embedded,cython
|
|
14
14
|
Classifier: Development Status :: 3 - Alpha
|
|
@@ -46,8 +46,8 @@ Dynamic: license-file
|
|
|
46
46
|
|
|
47
47
|
# rdbpy
|
|
48
48
|
|
|
49
|
-
[](https://github.com/nustackdev/rdbpy/actions/workflows/build.yml)
|
|
50
|
+
[](https://github.com/nustackdev/rdbpy/actions/workflows/test.yml)
|
|
51
51
|
[](https://pypi.org/project/rdbpython/)
|
|
52
52
|
[](https://pypi.org/project/rdbpython/)
|
|
53
53
|
[](https://opensource.org/licenses/MIT)
|
|
@@ -6,6 +6,4 @@ import pytest
|
|
|
6
6
|
def pytest_configure(config: pytest.Config) -> None:
|
|
7
7
|
"""Register custom markers."""
|
|
8
8
|
# Package markers
|
|
9
|
-
config.addinivalue_line("markers", "everyshape: Tests for core everyshape package")
|
|
10
9
|
config.addinivalue_line("markers", "rdbpy: Tests for RocksDB bindings")
|
|
11
|
-
config.addinivalue_line("markers", "estup: Tests for tuple codec")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{rdbpython-0.2.2 → rdbpython-0.2.4}/src/rdbpy/include/rdb_include/merge_operator_wrapper.hpp
RENAMED
|
File without changes
|
{rdbpython-0.2.2 → rdbpython-0.2.4}/src/rdbpy/include/rdb_include/slice_transform_wrapper.hpp
RENAMED
|
File without changes
|
|
File without changes
|
{rdbpython-0.2.2 → rdbpython-0.2.4}/src/rdbpy/include/rdb_include/write_batch_iter_helper.hpp
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|