Skip to content

Commit abcec65

Browse files
committed
Wire enable_multi_writes through C API backend
1 parent 0a7711e commit abcec65

2 files changed

Lines changed: 2 additions & 6 deletions

File tree

src_py/_lbug_capi.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ class _LbugSystemConfig(ctypes.Structure):
2323
("checkpoint_threshold", ctypes.c_uint64),
2424
("throw_on_wal_replay_failure", ctypes.c_bool),
2525
("enable_checksums", ctypes.c_bool),
26+
("enable_multi_writes", ctypes.c_bool),
2627
]
2728
if sys.platform == "darwin":
2829
_fields_.append(("thread_qos", ctypes.c_uint32))
@@ -972,10 +973,6 @@ def __init__(
972973
enable_checksums: bool = True,
973974
enable_multi_writes: bool = False,
974975
):
975-
if enable_multi_writes:
976-
raise NotImplementedError(
977-
"enable_multi_writes is not yet wired in C-API backend"
978-
)
979976
self._database = _LbugDatabase()
980977
config = _LIB.lbug_default_system_config()
981978
config.buffer_pool_size = buffer_pool_size
@@ -988,6 +985,7 @@ def __init__(
988985
config.checkpoint_threshold = checkpoint_threshold
989986
config.throw_on_wal_replay_failure = throw_on_wal_replay_failure
990987
config.enable_checksums = enable_checksums
988+
config.enable_multi_writes = enable_multi_writes
991989

992990
state = _LIB.lbug_database_init(
993991
database_path.encode("utf-8"), config, ctypes.byref(self._database)

test/capi_xfails.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@
2525
"test/test_issue.py::test_empty_list2",
2626
"test/test_issue.py::test_empty_map",
2727
"test/test_json.py::test_to_json_string_param_roundtrip",
28-
"test/test_mvcc_bank.py::test_multi_writer_no_anomalies",
29-
"test/test_mvcc_bank.py::test_multi_writer_stress_no_anomalies",
3028
"test/test_parameter.py::test_empty_list_param",
3129
"test/test_parameter.py::test_map_param",
3230
"test/test_parameter.py::test_general_list_param",

0 commit comments

Comments
 (0)