Commit Graph

2511 Commits

Author SHA1 Message Date
Leonid Yuriev
61f0ee891f mdbx-docs: workaround for Doxygen's macros bug(s).
Change-Id: I959b36aa8037ca17b0dca2be33d091f0a53f491f
2020-10-31 03:08:41 +03:00
Leonid Yuriev
a32c69813d mdbx: update ChangeLog.
Change-Id: If4b99d93967e077e97e1423010686d6e21a984b5
2020-10-31 02:55:22 +03:00
Leonid Yuriev
1f6e325d71 mdbx-doc: refine Doxygen configuration.
Change-Id: I8fbcb30f18ff9f8efafbf97c22a1dfbebe7e0926
2020-10-31 02:55:22 +03:00
Leonid Yuriev
70241e25db mdbx: don't limit reclaimed-pglist if DB full.
More for 55d190bad9 and https://github.com/erthink/libmdbx/issues/123

Change-Id: Iecd19fe8f159d29a1434d03f43f0b277f2d6ab86
2020-10-30 19:22:37 +03:00
Leonid Yuriev
d9ceb84445 mdbx-tools: use mdbx_cursor_bind() inside the mdbx_load.
Change-Id: I632841817331dfd493125c95350ec79e26147171
2020-10-30 17:44:51 +03:00
Leonid Yuriev
0f64d0ee95 mdbx: update internal MDBX_NO_ROOT. 2020-10-30 17:44:51 +03:00
Leonid Yuriev
d5658c496f mdbx: fix mp_txnid check for spilled pages.
This is OMG stupid bug.

Тем не менее, ошибка не была замечена по трём причинам:
- some TODOs should be resolved, like [this](faddc71eac/src/core.c (4014)) and some others;
- test cases should be extended to triggering the page spilling threshold;
- mdbx_env_set_option() should be provide to tunning such threshold(s) (https://github.com/erthink/libmdbx/issues/128).

Resolves https://github.com/erthink/libmdbx/issues/126

Change-Id: If76336620aa83e6916e3aeaa838e0b6e68c34fd7
2020-10-30 17:44:31 +03:00
Leonid Yuriev
16c900b0a1 mdbx: fix assertion inside mdbx_cursor_del0().
Change-Id: I87ad3777215bee8a2b19f53ec92299db89431fa4
2020-10-29 00:55:42 +03:00
Leonid Yuriev
105947b50c mdbx: minor refine internals comments/docs.
Change-Id: Ie1dd2233259948b4906e66fb191832dbc6526c47
2020-10-29 00:55:12 +03:00
Leonid Yuriev
b1d21d571f mdbx: minor refine/fix MDBX_SAFE_NOSYNC description.
Change-Id: I26c6f56363b9ec89dd321961133784b410cea1e0
2020-10-27 20:02:17 +03:00
Leonid Yuriev
e1d9ac8b29 mdbx: merge branch 'devel'.
Change-Id: I75e7f183fba291faa7e380e7c95c3a7bb44fe6ac
2020-10-27 20:02:00 +03:00
Leonid Yuriev
faddc71eac mdbx-tools: cleanup/refine mdbx_dump & mdbx_load. 2020-10-27 01:08:01 +03:00
Leonid Yuriev
2120e396fc mdbx-test: fix logging typo.
Change-Id: I0e6c71c62d5b0ff8939ff5b08645bb8347637bec
2020-10-26 14:37:16 +03:00
Leonid Yuriev
3fd079262c mdbx: fix extra-rare MDBX_KEY_EXIST during mdbx_commit().
The MDX_KEYEXISTS error could occur inside mdbx_update_gc() in the extremely rare case:

- no GC records was reclaimed before mdbx_txn_commit() called;

- there were few loose pages during the transaction;

- some reader prohibit reclaiming, therefore mdbx_page_alloc(MDBX_ALLOC_GC),
  which called for obtain present GC-record's Id, returns MDBX_NOTFOUND;

- immediately then the reader completes its transaction and unlocks reclaiming;

- mdbx_update_gc() decide that no reclaimable GC entries,
  i.e. no GC-entries with ID < find_oldest(),
  and it is safe to use find_oldest() - 1 to store loose page list;

- but find_oldest() actually returns new/larger ID than expected,
  So KEYEXISTS will returned if using this ID.

Change-Id: I9726217d6b5983f1e31a211c0eeb3edc8ff94282
2020-10-26 14:37:16 +03:00
Leonid Yuriev
1804b78406 mdbx-debug: alter begin/end debug-includes.
Change-Id: I024e992f6864befa1a6cfbf2dd696c19095d3cdf
2020-10-26 14:36:59 +03:00
Leonid Yuriev
efe7cf2a95 mdbx-test: rework append testcase.
Change-Id: Ic4571bf1d9ccbe70536cd80cb3d88d55da03b31d
2020-10-26 03:52:07 +03:00
Leonid Yuriev
77e84ccca8 mdbx: refine mdbx_cursor_set() around the exact-flag.
Change-Id: Ifbad6bb4a3a4eabaf85c7986f9566705d53c45b9
2020-10-26 03:52:07 +03:00
Leonid Yuriev
1b21703c7b mdbx-test: rework/refine key-value generation.
Change-Id: I0da7c708cc18785f804112483bb86921fefdb8eb
2020-10-26 03:52:07 +03:00
Leonid Yuriev
3c55a27230 mdbx-test: add flipcoin_n().
Change-Id: I30463c244f44632f0dae13539c5855cba705e639
2020-10-26 01:30:35 +03:00
Leonid Yuriev
73c2e5355f mdbx-test: add log_pair() (minor).
Change-Id: Ifdb762e79b14df0608b5b298941114ada4bc0095
2020-10-26 00:55:32 +03:00
Leonid Yuriev
31857210c5 mdbx: minor reformat doxygen comments.
Change-Id: I0dbe6ddc1423a1fdcb2eb73b2e982e398de1faa7
2020-10-26 00:42:21 +03:00
Leonid Yuriev
56809cb711 mdbx-test: more auto-adjustment of min/max length of key/values.
Change-Id: I22ac3845a341f8f4414ac0719f1a4c007f035b60
2020-10-26 00:42:21 +03:00
Leonid Yuriev
7522246ccd mdbx: fix intenals for mdbx_get_equal_or_great().
Change-Id: I7b44df14c6f9ede4844d53e28c1b34d84fc664fa
2020-10-26 00:42:21 +03:00
Leonid Yuriev
1db0a6fc92 mdbx-test: add cursor_renew().
Change-Id: I7d7dac646aba7535391bd7585025e43cdd57d21c
2020-10-24 00:56:26 +03:00
Leonid Yuriev
2e3a552c3c mdbx: update ChangeLog.
Change-Id: I7d4eda460db2418682f072d3a38b7971796e2b2a
2020-10-23 03:33:08 +03:00
Leonid Yuriev
005517539b mdbx: adds SIGPIPE suppression inside the env_copy-thread.
Change-Id: Ib7d22b8db7435b396bd997b65ae1d6d5d3431ba9
2020-10-23 03:22:22 +03:00
Leonid Yuriev
fed14c8f4c mdbx: minor tweak mdbx_pages_xkeep().
Change-Id: I6df699aeb49640b0365918c33cff05dcbcef2b71
2020-10-23 03:18:00 +03:00
Leonid Yuriev
55d190bad9 mdbx: avoid MDBX_TXN_FULL while searching for a large multi-page region.
Resolves https://github.com/erthink/libmdbx/issues/123
but with TODO:
 - provide a user-configurable threshold instead of currently hard-coded default (MDBX_PNL_MAX/2).

Change-Id: Ia7bfd5f8d36e027444d234e3c3aabe4832313466
2020-10-22 18:04:02 +03:00
Leonid Yuriev
8a7caec54a mdbx: cleanup deletion internals.
Change-Id: Ibcc5e02d5274c4eac5d6f269bc2b029f6b30c5ab
2020-10-22 16:28:44 +03:00
Alex Sharov
97b47dea87
mdbx-docs: refine docs for geo.shrink_threshold (#125) 2020-10-22 14:12:04 +03:00
Leonid Yuriev
b0928219c3 mdbx: fast completion pure nested transactions.
Change-Id: I467cc0f2f3e781bf23bf8c45eb021987ae7c123b
2020-10-21 02:24:39 +03:00
Leonid Yuriev
fe8a101960 mdbx-test: minor fix nested case (avoid assertion failure).
Change-Id: Iad2bfc41b726e0737acda5afb354c9d70b372c86
2020-10-21 02:24:39 +03:00
Leonid Yuriev
daf37363b4 mdbx: fix cursor state after delete current entry.
The fix affect enough of code sections,
so there is a chance that some more changes will be required.

Resolves https://github.com/erthink/libmdbx/issues/121
Related to https://github.com/ledgerwatch/turbo-geth/issues/1147

Change-Id: I45b7637516de410923a0d723dbda8d818662ba15
2020-10-21 02:24:33 +03:00
Leonid Yuriev
f9a36f3eb1 mdbx: merge 'devel/b964b2abf' into master.
Change-Id: I0114bd59091044b56b72b3855b0a2e04da9c7eff
2020-10-21 02:23:23 +03:00
Leonid Yuriev
b964b2abf5 mdbx: more spelling.
Change-Id: I45e42c1d8ef51f910b8e41279b92e54a6b2ce772
2020-10-21 01:00:48 +03:00
Leonid Yuriev
603e250745 mdbx-cmake: fix/refine git-fetch_version macro for old branches.
Change-Id: Ied5b7c839da75de065fd86ec46da7b391022c948
2020-10-21 01:00:48 +03:00
Leonid Yuriev
7001d971e1 mdbx: clarify/refine mdbx_flush_iov().
Change-Id: Ib9462efdbf97e42b1e80bf130f8150072102d9ed
2020-10-21 01:00:48 +03:00
Leonid Yuriev
f73a8a8680 mdbx: add latency gathering for commit stages.
Change-Id: If68ceb6e69e5e565ce9de0fd9a80424b6da280c5
2020-10-21 01:00:48 +03:00
Leonid Yuriev
7cf92b66cf mdbx: add LIBMDBX_INLINE_API (both inline and non-inline of some API functions).
Change-Id: I00c2b6d3d2a0467080791ea0c1c2242742a20c78
2020-10-17 01:00:36 +03:00
Leonid Yuriev
38485c9f30 mdbx: minor refine cursor_sibling().
Change-Id: I2c92ef2c3081dfa0a9bdcd47de0f912a9927519e
2020-10-16 18:57:07 +03:00
Leonid Yuriev
fe98185319 mdbx: create FUNDING.yml
Change-Id: Ib5e786cbedc6a9dfc4ebbb063e92e1660e13eddb
2020-10-16 18:24:56 +03:00
Leonid Yuriev
112ce742f5 mdbx: refine update_gc().
Change-Id: I877cdf2efb623c61dc810ec1cebb985fe925a120
2020-10-12 00:09:06 +03:00
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