Commit Graph

2525 Commits

Author SHA1 Message Date
Leonid Yuriev
d3b5d0ca83 mdbx-ci: update spelling data.
Change-Id: Ic1a56bbe4cedf985f567a05f8ea4fd2ccc92cd3e
2020-11-15 08:06:04 +03:00
Leonid Yuriev
3a39874025 mdbx: update ChangeLog.
Change-Id: Ie3163ca1ffe4528564bb4c997b813c519510851d
2020-11-15 08:02:25 +03:00
Leonid Yuriev
462df477b0 mdbx-load: cosmetic fix missed space.
Change-Id: Ifb9deb7c31d2d191b621280b6afd63fad9d436a3
2020-11-15 07:57:46 +03:00
Leonid Yuriev
74e495569e mdbx-load: fix DBI-error without -s name option.
Related to https://github.com/erthink/libmdbx/issues/136

Change-Id: I1e634456867f92dc1488a826eabf65ab28e64c1b
2020-11-15 07:57:15 +03:00
Leonid Yuriev
3ed58c281a mdbx-load: fix hang at EOF in the 'plain text' (i.e. no headers) mode.
Related to https://github.com/erthink/libmdbx/issues/136

Change-Id: I6ac9762bc5ac6aaf8b947b2e4abb0b4ff6a14444
2020-11-15 07:54:09 +03:00
Leonid Yuriev
21d2af9e90 mdbx: merge branch 'c++' into devel.
Change-Id: Ibd7f6c323aaf4f681a2c2dd442d36f4a9459d400
2020-11-01 00:39:19 +03:00
Leonid Yuriev
4cb8067dce mdbx++: always provide implementation for mdbx::path == std::string.
Change-Id: I8ef5c1531dc378b4141637ec4ddae3bbc67f1570
2020-10-31 23:24:05 +03:00
Leonid Yuriev
74bf948611 mdbx++: fix slice::encode/decode().
Change-Id: I56122e47a552e8e343e15bc878c767e34d269069
2020-10-31 23:23:56 +03:00
Leonid Yuriev
586e25c48c mdbx++: add operator<<(ostream, pair_result).
Change-Id: I44cc28f7f4f7d65225239d62f5bb8a15a8de16a8
2020-10-31 23:23:46 +03:00
Leonid Yuriev
e3f32ec6b4 mdbx++: refine operator<<(ostream, pair).
Change-Id: I0f42c17a241cf4e2ed6ae8f18e84a13ba5500a3b
2020-10-31 23:23:30 +03:00
Leonid Yuriev
4e198915f2 mdbx++: fix slice::is_printable().
Change-Id: I7f572f8e2179313e3cd312a58e46d445b920ba3e
2020-10-31 23:22:31 +03:00
Leonid Yuriev
9f92d5fb7e mdbx++: rename put_mode::insert to insert_unique."
Change-Id: I132f1d6bcc4161d1438a77cbc1fd85cdaa22842b
2020-10-31 23:22:21 +03:00
Leonid Yuriev
4a9c387519 mdbx++: fix static_assertion slice::slice(text).
Change-Id: Id77d6064461becd4a9d8e2b914d39217f7a3b575
2020-10-31 23:22:11 +03:00
Leonid Yuriev
5ad167410c mdbx: fix handling MDBX_GET_BOTH_RANGE.
Partially revert 77e84ccca8 and 7522246ccd.

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

Change-Id: Ib9f49a3e6a108a0d914ccde7ccb4dc0ef6056ff7
2020-10-31 20:54:53 +03:00
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