Commit Graph

2769 Commits

Author SHA1 Message Date
Leonid Yuriev
62da4db09a mdbx: fix/refine the use of C11 atomics.
Change-Id: I5d925d4625b06296fd82f4b35ee36be682e7b2d3
2020-10-11 18:54:07 +03:00
Leonid Yuriev
041a4c0aa5 mdbx: make enabling of read-ahead strategy more aggressive.
Change-Id: I7765c1a1ac27db86ce9676846ec5a723860dc934
2020-10-11 01:14:30 +03:00
Leonid Yuriev
071ad525c8 mdbx: refine handle_env_pathname() for direct pathname of data-file inside sudir-mode.
Change-Id: I5b7e7c7ea5c17e00c344fedb5c96f8d94fc04fc8
2020-10-11 00:14:53 +03:00
Leonid Yuriev
de1856a73c mdbx: workaround for broken DEFINE_ENUM_FLAG_OPERATORS from Windows SDK.
Change-Id: I5335c72061b7c5b6b29c683061a5da95544b9753
2020-10-10 23:53:35 +03:00
Leonid Yuriev
1d71c677f6 mdbx++: add env::remove() method.
Change-Id: If0396d38738df88d054eb8fb752c7bd3afbd8487
2020-10-10 18:31:15 +03:00
Leonid Yuriev
6e82dd5d0c mdbx: minor refine description of mdbx_env_delete().
Change-Id: I095c741fba08b08c6302116d9601438d813524a1
2020-10-10 18:30:21 +03:00
Leonid Yuriev
9afbde9b0a mdbx-test: use mdbx_env_delete() in a test and drop aux functions.
Change-Id: I3b0e409c23067abcaefd4f9c5627df804382b348
2020-10-10 00:59:12 +03:00
Leonid Yuriev
0627d902dd mdbx: add mdbx_env_delete().
Resolves https://github.com/erthink/libmdbx/issues/119
Related to https://github.com/Kerollmops/heed/issues/58

Change-Id: Iec5bf5978e45bb6843f3ed8dd06ea4d34f2895cb
2020-10-10 00:58:53 +03:00
Leonid Yuriev
cd0c727880 mdbx: internally split-out mdbx_handle_env_pathname().
Change-Id: Ibe387662d737d4d1e274ac0e126053872be503f9
2020-10-10 00:52:41 +03:00
Leonid Yuriev
c4e3b95301 mdbx: clarify the mdbx_env_open()'s pathname parameter description.
Change-Id: I1afafe621b2047abe4af02d37d51142a94abb982
2020-10-10 00:52:41 +03:00
Leonid Yuriev
9bf7d53dc2 mdbx: MAX_MAPSIZE32 value has been reduced to 0x7f000000.
Change-Id: Ia45dd56621cd92441a45b8e80420a124cd111fdc
2020-10-10 00:52:41 +03:00
Leonid Yuriev
7ba13d8e72 mdbx: add internal bits/flags table.
Change-Id: Ia9d0e9f678b51d8ffd1830998e9cd5d04c749974
2020-10-10 00:52:41 +03:00
Leonid Yuriev
05b3b4e51e mdbx-packages: add patch for buildroot.
Based on v0.9.1.0

Change-Id: If61d1f47e3ad71479ccfb1d25dbfd4a5c9e750cc
2020-10-10 00:52:37 +03:00
Leonid Yuriev
8f490d1474 mdbx: update ChangeLog.md
Change-Id: Icdfd9d06276623983454a0c58282856134d50150
2020-10-08 13:31:22 +03:00
Leonid Yuriev
c139eacb2d mdbx-chk: avoid use GetTickCount64() for Windows 2000/XP.
Change-Id: Ibad5c5ec0590cd3776283237de2cb83126785726
2020-10-08 01:50:18 +03:00
Leonid Yuriev
9b64b95bbc mdbx-windows: fix mdbx_RegGetValue() for Windows 2000/XP.
Change-Id: I436a254300fcba8dbf75ea7568c2bf0c963fe060
2020-10-08 01:50:18 +03:00
George Hazan
e8fecd1eec mdbx: fix opening DB on a network shares (pass MDBX_EXCLUSIVE from env).
Change-Id: Ic5c68033ba81043ac7800f99aae364bf082c868f
2020-10-08 01:50:18 +03:00
Leonid Yuriev
0f3b82f661 mdbx: minor refine WITH_CURSOR_TRACKING macro.
Change-Id: I61a4782ae76aed624fe37f7dde2b0ef7eb5dfb64
2020-10-08 01:50:18 +03:00
Leonid Yuriev
76b3fd4311 mdbx-make: add bench-couple target.
Change-Id: I2e077dee7d6f6b3d60abac302983e387eaef67bc
2020-10-08 01:50:18 +03:00
Leonid Yuriev
b274fdd142 mdbx: clarify page-merge strategy.
Change-Id: I1bb843ab6bdfcd53deae6d219a5b164bd3a79fd3
2020-10-08 01:49:56 +03:00
Leonid Yuriev
f5ce471ebb mdbx: fix minor copy&paste typo.
Change-Id: I5a1be230d0ca92123006e709aaaf78496918c91a
2020-10-07 12:18:28 +03:00
Leonid Yuriev
fe65c122d2 mdbx: fix pthread_yield() for non-GLIBC.
Change-Id: I080e37a42b62e524896dea8747e9f23e2fcd584f
2020-10-06 00:28:12 +03:00
Leonid Yuriev
787eaaa373 mdbx-cmake: pthread workaround for buggy toolchain/cmake/buildroot.
Change-Id: I0d95e783abbd10a63cd1595a9de50593e814a967
2020-10-05 19:15:18 +03:00
Leonid Yuriev
8d4e7994c0 mdbx-load: fix minor false-positive GCC warning.
Change-Id: Ie75c793712d050e8d3da76a4d0a8df9b81dc5275
2020-10-05 19:15:18 +03:00
Leonid Yuriev
70b615e8d4 mdbx: don't use yield instruction on ARM if unsupported.
Change-Id: I0b01d783fe4336b089f4b051fb61c203b5879aa5
2020-10-05 19:15:07 +03:00
Leonid Yuriev
280ed17ea2 mdbx: fix obsolete __noreturn.
Change-Id: Ic78843d6f16de2a409c16ceecc7acb2ed8aa3e68
2020-10-05 19:14:20 +03:00
Leonid Yuriev
dc2cd19d56 mdbx-cmake: fix missing installation of mdbx.h++
Change-Id: I41975e4eeff6583a266b273b9a4f8486982ede90
2020-10-02 00:05:02 +03:00
Leonid Yuriev
5807e2eda0 mdbx++: fix minor copy&paste typo.
Change-Id: I0af3e7ffbbd1231069a60f9f48880df3df2141d7
2020-10-01 02:28:10 +03:00
Leonid Yuriev
649dd04020 mdbx-make: add BENCH_CRUD_MODE option for bench* targets.
Change-Id: Ic654f0d68868032f288a2948bd4d5427fdaba2d5
2020-10-01 02:28:10 +03:00
Leonid Yuriev
7fcf94be64 mdbx-test: don't wait for long-lived readers until DB growth. 2020-09-30 16:45:19 +03:00
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
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