2389 Commits

Author SHA1 Message Date
Leonid Yuriev
de441fffbd mdbx-make: add bench-triplet with sqlite3. 2020-09-30 14:36:00 +03:00
Leonid Yuriev
44b1a3bcff
mdbx: release v0.9.1
Added features:

 - Preliminary C++ API with support for C++17 polymorphic allocators.
 - [Online C++ API reference](https://erthink.github.io/libmdbx/) by Doxygen.
 - Quick reference for Insert/Update/Delete operations.
 - Explicit `MDBX_SYNC_DURABLE` to sync modes for API clarity.
 - Explicit `MDBX_ALLDUPS` and `MDBX_UPSERT` for API clarity.
 - Support for read transactions preparation (`MDBX_TXN_RDONLY_PREPARE` flag).
 - Support for cursor preparation/(pre)allocation and reusing (`mdbx_cursor_create()` and `mdbx_cursor_bind()` functions).
 - Support for checking database using specified meta-page (see `mdbx_chk -h`).
 - Support for turn to the specific meta-page after checking (see `mdbx_chk -h`).
 - Support for explicit reader threads (de)registration.
 - The `mdbx_txn_break()` function to explicitly mark a transaction as broken.
 - Improved handling of corrupted databases by `mdbx_chk` utility and `mdbx_walk_tree()` function.
 - Improved DB corruption detection by checking parent-page-txnid.
 - Improved opening large DB (> 4Gb) from 32-bit code.
 - Provided `pure-function` and `const-function` attributes to C API.
 - Support for user-settable context for transactions & cursors.
 - Revised API and documentation related to Handle-Slow-Readers callback feature.

Deprecated functions and flags:

 - For clarity and API simplification the `MDBX_MAPASYNC` flag is deprecated.
   Just use `MDBX_SAFE_NOSYNC` or `MDBX_UTTERLY_NOSYNC` instead of it.
 - `MDBX_oom_func`, `mdbx_env_set_oomfunc()` and `mdbx_env_get_oomfunc()`
   replaced with `MDBX_hsr_func`, `mdbx_env_get_hsr` and `mdbx_env_get_hsr()`.

Fixes:

 - Fix `mdbx_strerror()` for `MDBX_BUSY` error (no error description is returned).
 - Fix update internal meta-geo information in read-only mode (`EACCESS` or `EBADFD` error).
 - Fix `mdbx_page_get()` null-defer when DB corrupted (crash by `SIGSEGV`).
 - Fix `mdbx_env_open()` for re-opening after non-fatal errors (`mdbx_chk` unexpected failures).
 - Workaround for MSVC 19.27 `static_assert()` bug.
 - Doxygen descriptions and refinement.
 - Update Valgrind's suppressions.
 - Workaround to avoid infinite loop of 'nested' testcase on MIPS under QEMU.
 - Fix a lot of typos & spelling (Thanks to Josh Soref for PR).
 - Fix `getopt()` messages for Windows (Thanks to Andrey Sporaw for reporting).
 - Fix MSVC compiler version requirements (Thanks to Andrey Sporaw for reporting).
 - Workarounds for QEMU's bugs to run tests for cross-builded library under QEMU.
 - Now C++ compiler optional for building by CMake.

TODO for next version(s):

 - Rework/speedup the implementation of the dirty page list (lazy compactification, lazy sorting via merge).
 - Finalize C++ API (few typos and trivia bugs are likely for now).
 - Packages for ROSA Linux, ALT Linux, Fedora/RHEL, Debian/Ubuntu.

Change-Id: I668d77e4545d444b60708b8c64a66ce43b2c56a0
v0.9.1
2020-09-30 13:28:01 +03:00
Leonid Yuriev
775238891a mdbx-ci: refine release-assets action to include version to tarball name.
Change-Id: I085ac5e52e24a34b056a84771b6c42f2ffe46dbc
2020-09-30 13:27:54 +03:00
Leonid Yuriev
309f9a3172 mdbx-cmake: cosmetic fix for MDBX_BUILD_TYPE.
Change-Id: I26bfa69e268934d530acb1c85777d385730d573b
2020-09-30 04:01:48 +03:00
Leonid Yuriev
fc965c57ac mdbx: fix merge_sync_flags() to preserve MDBX_UTTERLY_NOSYNC.
Change-Id: I59dbd1ef8ac1747dd20565ff444e4feb5d0e0e71
2020-09-30 04:01:36 +03:00
Leonid Yuriev
f6850f5367 mdbx: Support for user-settable cursor context.
Change-Id: I9bd60c432924e39020b2d3af3280f13c44d6cd91
2020-09-29 21:15:25 +03:00
Leonid Yuriev
72e136b9da mdbx-doc: fix/refine README & Doxygen docs.
Change-Id: I79cfb44f84fbf0f118b0d209af1ef62bb9dae72a
2020-09-29 21:15:25 +03:00
Leonid Yuriev
c8a0951566 mdbx: rework API and Docs around Handle-Slow-Readers (no algorithmic changes).
Change-Id: I5b76a8400ce6f5f241f8e4a7f53d746fe39f8e1e
2020-09-29 21:15:25 +03:00
Leonid Yuriev
6294e1710a mdbx: support for user-settable transaction context.
Change-Id: Ib4a345628e2c1ca2f95ac7615ea53d94911e5198
2020-09-29 20:59:55 +03:00
Leonid Yuriev
10c50aaf2e mdbx-cmake: minor refine MDBX_BUILD_TARGET/MDBX_BUILD_TYPE, etc.
Change-Id: I34f99c50ced56b310576743c56422a1e1992c03b
2020-09-29 20:59:55 +03:00
Leonid Yuriev
11b410dcfe mdbx-cmake: fix stdc++fs linking for modern GCC/CLANG.
Change-Id: I3dc82d09594cb32a14f2ee6673badcf4f4e411eb
2020-09-29 20:59:55 +03:00
Leonid Yuriev
5374d06d92 mdbx: fix minor MSVC warning.
Change-Id: Ie3c9fa7ba21cd88f7a0c08a1529542ba394fe9c8
2020-09-29 20:59:55 +03:00
Leonid Yuriev
b13e9f01fc mdbx++: move to_string() inlines to std::.
Change-Id: I8d0ec1cd64f8a8c7da57c769255089a5fd969940
2020-09-29 20:59:54 +03:00
Leonid Yuriev
75e360b8b3 mdbx++: add std::hash<> specialization for mdbx::slice.
Change-Id: I4402122f0f088bfa8eea753df931537cfe935086
2020-09-29 20:59:54 +03:00
Leonid Yuriev
fde4186883 mdbx: update ChangeLog.
Change-Id: Ib2edc6e0f453d113cacc6c4a5b1851d2ef8b1a52
2020-09-29 20:59:54 +03:00
Leonid Yuriev
2a0c9d83e0 mdbx-load: refine usage-help for -n option.
Change-Id: I4af2ea041bca323f8647601f49610f93a8f97d38
2020-09-28 15:48:21 +03:00
Leonid Yuriev
c0cc531b50 mdbx-doc: minor refine man-pages for -n utils option.
Change-Id: Ie81145fc1ec70f66e6c7be7332b2106d6636dc6b
2020-09-28 15:48:21 +03:00
Leonid Yuriev
cea56c3840 mdbx-cmake: makes an C++ compiler optional.
Change-Id: Id1445a95e4a458012e77e1e505563025f0471487
2020-09-27 17:01:59 +03:00
Leonid Yuriev
2c088a17c4 mdbx-cmake: refine options' section.
Change-Id: I83633f43275cffed02610fadafd034513ddd3da9
2020-09-27 17:01:59 +03:00
Leonid Yuriev
2138fccfec mdbx-cmake: remove dups.
Change-Id: I1909ac16b1dcb55c9356283bf5fff94c1c8f7b4e
2020-09-27 17:01:59 +03:00
Leonid Yuriev
c5bee38e28 mdbx-cmake: customizable destination for bin/lib/man.
Change-Id: I7ffff8593ec741b134ca575a01efeaef3f873eeb
2020-09-27 17:01:59 +03:00
Leonid Yuriev
92bc728f39 mdbx: update warnings/errors for old version GCC/CLANG/MSVC/GLIBC.
Change-Id: I355316f6c8d96eae4bd5d9743f0b6e50caddcbcd
2020-09-27 17:01:59 +03:00
Leonid Yuriev
1e3f633665 mdbx: fix build with uclibc.
Change-Id: I907fecd84b335a84d5f1dcaa44ac489c4dfb1907
2020-09-27 17:01:59 +03:00
Leonid Yuriev
12770cae88 mdbx-test: cleanup for without MDBX_NOSUBDIR case.
Change-Id: I50d6640108ca229e4919ea96469152d2533f9cab
2020-09-27 17:01:59 +03:00
Leonid Yuriev
5627521f16 mdbx++: more spelling.
Change-Id: I3f33e695fb918c6a57c39047bba54a72ecb9bc5b
2020-09-27 17:01:59 +03:00
Josh Soref
411b89647c mdbx-ci: Add check-spelling.
Related to https://github.com/erthink/libmdbx/pull/118

Change-Id: Ic1fa20e7d32894c00283ddafd10e174154fc261f
2020-09-27 17:01:58 +03:00
Leonid Yuriev
5d582b1b3a mdbx-chk: refine output (bootid, steady/weak, kv-kind).
Change-Id: Ia2474f7bb9a25adf761a561d0704362dca930796
2020-09-27 17:01:58 +03:00
Leonid Yuriev
6eaa838e3e mdbx: clarify logging for MDBX_WANNA_RECOVERY in case sync-needed in rdonly-mode.
Change-Id: I7032cfbce857e2acfb93de383272a4f41ab6a7fb
2020-09-27 17:01:58 +03:00
Leonid Yuriev
12339d4e7c mdbx: rename bootid' fields to be neutral for endianess.
Change-Id: I7d52d3c2c93dcc6e886d336885070eb1aee1c284
2020-09-26 02:23:09 +03:00
Leonid Yuriev
989a7c992e mdbx++: drop mdbx:offset_of и mdbx::owner_of.
Change-Id: Idfd0b20677388a009d7a3e0bd29b5afb9f767b8f
2020-09-26 02:22:41 +03:00
Leonid Yuriev
c424a80705 mdbx++: refine buffer::data_preserver.
Change-Id: Ie101209588daa10bb5ad21ece0f3ea469e9b98e6
2020-09-26 02:06:21 +03:00
Leonid Yuriev
9f071c7dbe mdbx: minor update README.
Change-Id: I5f1615979533d4f0c117bf4abaf633d7a795ead3
2020-09-25 02:27:40 +03:00
Leonid Yuriev
693f353811 mdbx: update ChangeLog.
Change-Id: Ic334ab08b517056752f2e00fdf26299e2cfabfac
2020-09-25 02:17:57 +03:00
Leonid Yuriev
12652852bd mdbx-doc: update man-pages.
Change-Id: Ia9caf0082c32cf95526cc1080507c61f9269c9dc
2020-09-25 02:10:55 +03:00
Leonid Yuriev
af331a9e7c mdbx-tools: fix getopt's messages for windows.
Thank to Andrey Sporaw for the reporting.

Change-Id: I7531427c48b1a2f5483e2f04175cded2d34062a8
2020-09-25 01:53:43 +03:00
Leonid Yuriev
75a4463811 mdbx: minor misc cosmetics & refines.
Change-Id: I84b70aeded047ab3786a57c864dbc89364969afa
2020-09-25 01:21:45 +03:00
Leonid Yuriev
860aa017db mdbx: Merge branch 'master' into devel.
Change-Id: Ic130cd181097332aa2f49019d75403e18d8cba0d
2020-09-25 01:14:57 +03:00
Josh Soref
448728f584 mdbx: a lot of spelling (squashed).
Many Thanks to Josh Soref for these fixes.
https://github.com/jsoref

Resolves https://github.com/erthink/libmdbx/pull/118.

Change-Id: I4e09347da5c9d7a77cdd918a3b15284371440076
2020-09-25 01:01:25 +03:00
Leonid Yuriev
4eab5b238a mdbx-chk: support for turn to a specified meta-page.
Change-Id: I9d088681e7bd66a2f8b5917067c4f847733d17ac
2020-09-23 10:05:38 +03:00
Leonid Yuriev
58708f7162 mdbx: add mdbx_env_turn_for_recovery().
Change-Id: Ic02a5adf9ad398ae5b499e8808157e41ec42457e
2020-09-23 10:05:38 +03:00
Leonid Yuriev
9b5097fe9d mdbx: add paranoid checks for txnid overflow.
Change-Id: I0036a080d40a0da9ffc55ff838d91799ff0ceadb
2020-09-23 10:05:38 +03:00
Leonid Yuriev
c67a611313 mdbx-chk: refine output basic info of sub-databases.
Change-Id: Ia51b753990eb7a552dab016aab352b37c62ce4c3
2020-09-23 10:05:37 +03:00
Leonid Yuriev
7762e6e836 mdbx-chk: show last modification of each sub-database.
Change-Id: Ib424d17371adaef543a10b4f1d8a456cd6466046
2020-09-23 10:05:37 +03:00
Leonid Yuriev
d4b16c981d mdbx: fix minor Coverity warning.
Change-Id: Id92d85a7032a20a4b06d87878e32d8997b6558e3
2020-09-23 10:05:37 +03:00
Leonid Yuriev
45909eca61 mdbx-chk: fix minor typo.
Change-Id: Ib120f7af827463dd93af352fc8b4ce6af1926b75
2020-09-23 10:05:37 +03:00
Leonid Yuriev
7fe4fccda8 mdbx: acquire exclusive lock for the destination file during mdbx_env_copy().
Change-Id: Ic75796025dd2a649840b96b1f71aecac9360d010
2020-09-23 10:05:37 +03:00
Leonid Yuriev
24c0749eb8 mdbx: rework/refine mdbx_mresize() for POSIX and MAP_FIXED_NOREPLACE (Linux 4.17).
Change-Id: I2e531b5e3e009b2a18ae1901fc7e2e6e4df667cd
2020-09-22 04:07:43 +03:00
Leonid Yuriev
5c89717ecd mdbx: update ChangeLog (preparation to v9.1 release).
Change-Id: I58313f4bae4c31f4979d1000b45b3d5c04a9312d
2020-09-22 00:41:05 +03:00
Leonid Yuriev
8d1a8d3f4f mdbx-make: workarounds for cross-qemu target (running tests for cross-builded library under QEMU).
QEMU 4.2 has problems with extending mmap range while emulating SPARC64 and Alpha platforms.
So as a workaround, just run the test on SPARC64 and Alpha with a fixed database size.

Change-Id: I2d727cd718bde9ee8e8a7eab1be25b5048ef42fd
2020-09-22 00:16:44 +03:00
Leonid Yuriev
e86bc5b901 mdbx-test: avoid looping on MIPS under QEMU.
Change-Id: I0e91bdd21441634dd1a6cfcd00a2e8b9f99034aa
2020-09-21 17:18:07 +03:00