mdbx-test: fix calculation default size_now of DB.

This commit is contained in:
Leonid Yuriev 2022-02-01 16:06:56 +03:00 committed by Леонид Юрьев (Leonid Yuriev)
parent 5aeb7ccf25
commit 65defdd0a8

View File

@ -134,9 +134,8 @@ void actor_params::set_defaults(const std::string &tmpdir) {
table_flags = MDBX_DUPSORT;
size_lower = -1;
size_now =
intptr_t(1024) * 1024 * ((table_flags & MDBX_DUPSORT) ? 256 : 1024);
size_now = std::max(size_now, mdbx_limits_dbsize_max(-1));
size_now = intptr_t((table_flags & MDBX_DUPSORT) ? 256 : 1024) << 20;
size_now = std::min(size_now, mdbx_limits_dbsize_max(-1));
size_upper = -1;
shrink_threshold = -1;
growth_step = -1;