3321 Commits

Author SHA1 Message Date
Леонид Юрьев (Leonid Yuriev)
6b45498985 mdbx: temporary workaround/hotfix for a flaw of Linux 4.19 (at least) unified page/buffer cache.
Temporary workaround for https://github.com/erthink/libmdbx/issues/269.
2022-02-22 23:58:57 +03:00
Леонид Юрьев (Leonid Yuriev)
1fd4101e2e mdbx: update ChangeLog. 2022-02-21 00:06:57 +03:00
Леонид Юрьев (Leonid Yuriev)
77f236db2a mdbx: clarify loglevel descriptions. 2022-02-17 02:30:16 +03:00
Леонид Юрьев (Leonid Yuriev)
a0728023cd mdbx: fix typo in a retained space calculation for the hsr-callback. 2022-02-16 15:44:06 +03:00
Леонид Юрьев (Leonid Yuriev)
3705d705d3 mdbx: refine/fix pages reserving inside mdbx_updage_gc() to avoid non-reclamation in a rare cases. 2022-02-16 12:18:53 +03:00
Леонид Юрьев (Leonid Yuriev)
72bc655ece mdbx++: fix env::is_empty() to check leaf-pages instead of branch ones.
Seems like an auto-completion mistake.
Thanks to https://igor@t.me/libmdbx for reporing.
2022-02-15 18:11:31 +03:00
Леонид Юрьев (Leonid Yuriev)
c5f1f73fca mdbx: avoid extra looping inside mdbx_page_alloc() for mdbx_prep_backlog(). 2022-02-15 03:17:05 +03:00
Леонид Юрьев (Leonid Yuriev)
925a673d57 mdbx: make mdbx_env_open() idempotence in failure cases.
Fixes https://github.com/erthink/libmdbx/issues/267.
2022-02-13 20:30:57 +03:00
Леонид Юрьев (Leonid Yuriev)
c27787eb31 mdbx: fix potential SIGSEGV for DB with non-default page size.
Related to https://github.com/erthink/libmdbx/issues/267.
2022-02-13 17:04:10 +03:00
Леонид Юрьев (Leonid Yuriev)
2b6fd968d2 mdbx: rework functions for meta-pages, split-off non-volatile, more const. 2022-02-09 22:56:29 +03:00
Леонид Юрьев (Leonid Yuriev)
ef7b4289c0 mdbx: rework unaligned access.
The three points:
 - disentangle C11-atomic fences/barriers and pure-functions (with `__attribute__((__pure__))`) to avoid compiler misoptimization;
 - fix hypotetic unaligned access to 64-bit dwords on ARM with `__ARM_FEATURE_UNALIGNED` defined;
 - reasonable paranoia that makes clarity for code readers.
2022-02-09 22:56:28 +03:00
Леонид Юрьев (Leonid Yuriev)
cbbfaf3202 mdbx-doc: fix doxygen-reference to the "Long-lived read transactions" paragraph. 2022-02-08 14:37:11 +03:00
Леонид Юрьев (Leonid Yuriev)
f6be8e3e9a mdbx: minor refine note about MDBX_WITHOUT_MSVC_CRT option. 2022-02-03 03:12:23 +03:00
Леонид Юрьев (Leonid Yuriev)
daa7f04f61
mdbx: release v0.11.4
The stable release with fixes for large and huge databases sized of 4..128 TiB.

Acknowledgements:
-----------------

 - Ledgerwatch, Binance and Positive Technologies teams for reporting, assistance in investigation and testing.
 - Alex Sharov for reporting, testing and provide resources for remote debugging/investigation.
 - Kris Zyp for Deno support.

New features, extensions and improvements:
------------------------------------------

 - Added treating the `UINT64_MAX` value as maximum for given option inside `mdbx_env_set_option()`.
 - Added `to_hex/to_base58/to_base64::output(std::ostream&)` overloads without using temporary string objects as buffers.
 - Added `--geometry-jitter=YES|no` option to the test framework.
 - Added support for [Deno](https://deno.land/) support by [Kris Zyp](https://github.com/kriszyp).

Fixes:
------

 - Fixed handling `MDBX_opt_rp_augment_limit` for GC's records from huge transactions (Erigon/Akula/Ethereum).
 - [Fixed](https://github.com/erthink/libmdbx/issues/258) build on Android (avoid including `sys/sem.h`).
 - [Fixed](https://github.com/erthink/libmdbx/pull/261) missing copy assignment operator for `mdbx::move_result`.
 - Fixed missing `&` for `std::ostream &operator<<()` overloads.
 - Fixed unexpected `EXDEV` (Cross-device link) error from `mdbx_env_copy()`.
 - Fixed base64 encoding/decoding bugs in auxillary C++ API.
 - Fixed overflow of `pgno_t` during checking PNL on 64-bit platforms.
 - [Fixed](https://github.com/erthink/libmdbx/issues/260) excessive PNL checking after sort for spilling.
 - Reworked checking `MAX_PAGENO` and DB upper-size geometry limit.
 - [Fixed](https://github.com/erthink/libmdbx/issues/265) build for some combinations of versions of  MSVC and Windows SDK.

Minors:
-------

 - Added workaround for CLANG bug [D79919/PR42445](https://reviews.llvm.org/D79919).
 - Fixed build test on Android (using `pthread_barrier_t` stub).
 - Disabled C++20 concepts for CLANG < 14 on Android.
 - Fixed minor `unused parameter` warning.
 - Added CI for Android.
 - Refine/cleanup internal logging.
 - Refined line splitting inside hex/base58/base64 encoding to avoid `\n` at the end.
 - Added workaround for modern libstdc++ with CLANG < 4.x
 - Relaxed txn-check rules for auxiliary functions.
 - Clarified a comments and descriptions, etc.
 - Using the `-fno-semantic interposition` option to reduce the overhead to calling self own public functions.

Signed-off-by: Леонид Юрьев (Leonid Yuriev) <leo@yuriev.ru>
v0.11.4
2022-02-02 20:56:28 +03:00
Леонид Юрьев (Leonid Yuriev)
18290489b2 mdbx-cmake: don't use -fno-semantic-interposition for CLANG. 2022-02-02 19:22:50 +03:00
Леонид Юрьев (Leonid Yuriev)
92ab17a644 mdbx-test: resolve minor MSVC /W4 warnings. 2022-02-02 17:11:45 +03:00
Леонид Юрьев (Leonid Yuriev)
ac02490c97 mdbx-cmake: sync the compiler.cmake module with other projects. 2022-02-02 16:50:49 +03:00
Леонид Юрьев (Leonid Yuriev)
d498c2580b mdbx: more refine mdbx_env_set_geometry() description. 2022-02-02 14:28:45 +03:00
Леонид Юрьев (Leonid Yuriev)
e740df6e50 mdbx: fix description of mdbx_env_set_geometry().
Oops, I just noticed that there are a strange typos in the description.
It looks like a search&replace or cut&paste mistake.

Related to https://github.com/LWJGL/lwjgl3/issues/724.
2022-02-02 14:09:03 +03:00
Leonid Yuriev
b6a0d11b99 mdbx: add note to using recent MSVC & Windows SDK versions. 2022-02-02 14:09:03 +03:00
Leonid Yuriev
65defdd0a8 mdbx-test: fix calculation default size_now of DB. 2022-02-02 14:09:03 +03:00
Leonid Yuriev
5aeb7ccf25 mdbx: fix extra casting inside mdbx_limits_dbsize_max(). 2022-02-02 14:09:03 +03:00
Leonid Yuriev
79e1cc3bbc mdbx: add workaround for old MSVC and/or old Windows SDK.
Resolves https://github.com/erthink/libmdbx/issues/265.

Change-Id: I295b5d9d5ecd670ccf258791bf87379a3ca17f21
2022-02-01 13:28:59 +03:00
Leonid Yuriev
1c409a38d3 mdbx: add info about Deno support. 2022-01-31 21:36:57 +03:00
Leonid Yuriev
bd51e181fb mdbx: refine comment for mdbx_update_gc(). 2022-01-31 21:36:57 +03:00
Leonid Yuriev
dbba0fe18e mdbx-ci: disable broken spelling action. 2022-01-31 21:36:57 +03:00
Леонид Юрьев (Leonid Yuriev)
4e2a7465ab mdbx-make: fix/refine adding -Wno-unused-command-line-argument for tolerance to an old compilers.
More for https://github.com/erthink/libmdbx/issues/264.
2022-01-27 18:05:38 +03:00
Леонид Юрьев (Leonid Yuriev)
d93a13294a mdbx: explicit disable -Wattributes by #pragma for GCC < 9. 2022-01-27 17:20:12 +03:00
Leonid Yuriev
0fdeb7cd50 mdbx-make: add -Wno-unused-command-line-argument for CLANG > 12.
Resolves https://github.com/erthink/libmdbx/issues/264.
2022-01-26 18:50:57 +03:00
Leonid Yuriev
fe5199b9d1 mdbx: fix/rework PNL checking during search, refine/simplify spilled pages search.
Fixes https://github.com/erthink/libmdbx/issues/260.

Change-Id: I8824f6af2f770c46668ee577aeeeb93b30b17a13
2022-01-26 13:21:21 +03:00
Leonid Yuriev
bfc67a6f75 mdbx-test: ability to specify single test cases to run from a stochastic test script. 2022-01-26 12:10:29 +03:00
Leonid Yuriev
8adf242d02 mdbx-doc: more line-breaks for Doxygen. 2022-01-25 20:25:10 +03:00
Leonid Yuriev
f63f4f8924 mdbx-doc: fix typo in the Doxygen reference. 2022-01-25 20:24:18 +03:00
Leonid Yuriev
28fcf33cda mdbx-doc: fix/refine MDBX_dbi description. 2022-01-25 20:09:17 +03:00
Leonid Yuriev
207124e7fb mdbx: use -fno-semantic-interposition. 2022-01-25 18:19:56 +03:00
Leonid Yuriev
86d4e37327 mdbx: fix minor copy-paste errors in descriptions. 2022-01-25 01:08:14 +03:00
Leonid Yuriev
e7e82cb289 mdbx: minor refine README. 2022-01-23 00:16:01 +03:00
Leonid Yuriev
9ae56332d7 mdbx: fix Coverity warnings. 2022-01-22 18:01:31 +03:00
Leonid Yuriev
03d828834b mdbx: schedule the release of v0.11.4 for 2022-01-28. 2022-01-21 15:43:17 +03:00
Leonid Yuriev
97beb8ee53 mdbx: update ChangeLog. 2022-01-21 15:01:48 +03:00
Leonid Yuriev
03381fa469 mdbx++: clarify comments for mdbx::byte and char8_t usage.
Related to https://github.com/erthink/libmdbx/issues/263.
2022-01-21 15:00:34 +03:00
Leonid Yuriev
75b23524bd mdbx-doc: minor refine mdbx_env_set_geometry() description. 2022-01-21 11:44:05 +03:00
Leonid Yuriev
cd2c5f594c mdbx: rework checking MAX_PAGENO and DB upper-size limit.
Related to https://github.com/erthink/libmdbx/issues/260.
2022-01-21 02:25:27 +03:00
Leonid Yuriev
50b843ecb7 mdbx-test: more for --ignore-dbfull. 2022-01-21 02:13:48 +03:00
Leonid Yuriev
981b10d10a mdbx-test: add --geometry-jitter=YES|no option. 2022-01-21 02:13:48 +03:00
Leonid Yuriev
e1bcdb8e9a mdbx-make: prefer clang-format-13 or later. 2022-01-21 02:13:48 +03:00
Leonid Yuriev
ddef217047 mdbx: relax txn-check rules for auxiliary functions. 2022-01-21 02:13:48 +03:00
Leonid Yuriev
3e28cc2a25 mdbx: allow mdbx_dbi_flags_ex() for errored transactions. 2022-01-21 02:13:48 +03:00
Leonid Yuriev
f4cc7b3609 mdbx: add .err to .gitignore. 2022-01-21 02:13:48 +03:00
Leonid Yuriev
8779f665dc mdbx: fix excessive PNL checking after sort for spilling.
This bug triggered only in the DEBUG builds or when the assertion checking is forcibly enabled.
It does not affect any core logic and cannot lead to DB corruption, data loss, and so on.

Fixes https://github.com/erthink/libmdbx/issues/260.
2022-01-20 15:25:35 +03:00