Skip to content

fix max_db_size#24

Open
aheev wants to merge 3 commits into
LadybugDB:mainfrom
aheev:fix-max-db-size
Open

fix max_db_size#24
aheev wants to merge 3 commits into
LadybugDB:mainfrom
aheev:fix-max-db-size

Conversation

@aheev
Copy link
Copy Markdown
Contributor

@aheev aheev commented May 30, 2026

fixes #22

@aheev aheev force-pushed the fix-max-db-size branch from 92de9a6 to d06f594 Compare May 30, 2026 10:28
Comment thread test/conftest.py
Comment thread test/test_wal.py Outdated
Comment thread src_py/_lbug_capi.py Outdated
compression: bool = True,
read_only: bool = False,
max_db_size: int = (1 << 30),
max_db_size: int = 0xFFFFFFFF,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use the backend default instead of replicating the defaults here. Something like:

https://gist.github.com/adsharma/d9f1bad5f9921a3ea57c88d8fe085cd7

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

applied with a small change

--- a/src_cpp/py_database.cpp
+++ b/src_cpp/py_database.cpp
@@ -16,7 +16,7 @@ void PyDatabase::initialize(py::handle& m) {
                  bool, bool, bool>(),
             py::arg("database_path"), py::arg("buffer_pool_size") = 0,
             py::arg("max_num_threads") = 0, py::arg("compression") = true,
-            py::arg("read_only") = false, py::arg("max_db_size") = (uint64_t)1 << 43,
+            py::arg("read_only") = false, py::arg("max_db_size") = -1u,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since we're getting rid of py_bing path anyway

@aheev aheev force-pushed the fix-max-db-size branch from 7381739 to ea77c97 Compare May 31, 2026 04:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Database defaults max_db_size to 1 GiB on all platforms, contradicting its docstring (8 TiB on 64-bit)

2 participants