3261 Commits

Author SHA1 Message Date
Леонид Юрьев (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
Leonid Yuriev
52552ebfe3 mdbx++: fix MSVC warnings/errors. 2022-01-19 21:08:01 +03:00
Leonid Yuriev
a6acc9d1a3 mdbx++: fix minor comment typo.
Change-Id: Ic169523218b366be0688ab92b76c4120df829ba3
2022-01-17 11:06:27 +03:00
Leonid Yuriev
c588af6aca mdbx: update Copyright year.
Change-Id: Ib3e4c0ac94882c4b2a1e167dd98e6e26dbdf48a4
2022-01-17 11:06:14 +03:00
Leonid Yuriev
c076979225 mdbx++: add workaround for modern libstd++ with CLANG < 4.x
Change-Id: Ic82694f4f51bfdb2d6f6f072fdf9af791c0eb6f8
2022-01-17 11:06:07 +03:00
Leonid Yuriev
f2995ac75b mdbx++: add assertions for destination-overflow to from/to hex/base58/base64::write_bytes().
Change-Id: I5a1f23dcb1dc1942f9d72966a78080eacfacf546
2022-01-15 18:52:12 +03:00
Leonid Yuriev
b5b0a9a284 mdbx++: add to_hex/to_base58/to_base64::output(std::ostream&) without using temporary objects/buffers/strings.
Change-Id: Ideffd0e7f450307e14d780dcdeb2458c1c7e4c18
2022-01-15 18:52:12 +03:00
Leonid Yuriev
b139d8165b mdbx++: refine line splitting inside to_hex/to_base58/to_base64 to avoid \n at the end.
Change-Id: I53fb1f31ac5fc41567826a9035b0080fd62c8ade
2022-01-15 18:51:56 +03:00
Leonid Yuriev
ef2e390b10 mdbx++: fix from_base64::write_bytes().
Change-Id: I6c90997bffab45019a77edcf2a9dd35ae80069d3
2022-01-15 18:51:56 +03:00
Leonid Yuriev
51e6d4645c mdbx++: fix to_base64::write_bytes() for tail bytes.
Change-Id: I60defa11b7e44dcf2ac840160ab0c833484c9d39
2022-01-15 17:22:18 +03:00
Leonid Yuriev
2151be6cde mdbx: merge branch 'issue-260' into devel. 2022-01-15 15:31:45 +03:00