Leonid Yuriev
d116e7235a
mdbx-posix: safeguard for DB corruption in case FD <= STDERR_FILENO
.
...
Resolve https://github.com/erthink/libmdbx/issues/144
Change-Id: Ic3467338d494b021fa0d1863c8227976d0a2bcd5
2020-12-05 22:51:45 +03:00
Leonid Yuriev
3e7459b428
mdbx-windows: fix mdbx_realloc()
for nullptr and MDBX_AVOID_CRT=ON
.
...
Change-Id: I129221186d65254da5b1d84747e5c59d53864b70
2020-12-05 09:45:03 +03:00
Leonid Yuriev
338de2e1fb
mdbx: refine mdbx_page_spill()
.
...
More for https://github.com/erthink/libmdbx/issues/132 .
Change-Id: I40788c13b54453c17d5e5dae6c3d2f93226f8e00
2020-12-04 15:38:26 +03:00
Leonid Yuriev
12ee5e6cac
mdbx: minor refine mdbx_page_flush()
.
...
More for https://github.com/erthink/libmdbx/issues/132 .
Change-Id: I703e1359d859b8901fcbdf57211f7805cd6d5ff1
2020-12-04 15:38:26 +03:00
Leonid Yuriev
262e4981db
mdbx: refactor mdbx_pages_xkeep()
.
...
More for https://github.com/erthink/libmdbx/issues/132 .
Change-Id: Ie81b5c9efafa06e61d6d983769ff1f11a0e59a1e
2020-12-04 15:38:15 +03:00
Leonid Yuriev
df8260e29a
mdbx: add mdbx_pnl_purge_odd()
.
...
More for https://github.com/erthink/libmdbx/issues/132 .
Change-Id: I1926ee48785f30b82e827a8e1e69be1e7a0a209f
2020-12-04 15:38:15 +03:00
Leonid Yuriev
87c765c7be
mdbx: fix/check lower border for dirty-pages list's limits/options.
...
More for https://github.com/erthink/libmdbx/issues/128 .
Change-Id: Ie9dccee5cf90d26968db04f4f6d9afa3018fcf0e
2020-12-04 15:38:15 +03:00
Leonid Yuriev
0b02e080c4
mdbx: use pnl_xmerge()
to merge spill-pages lists.
...
More for https://github.com/erthink/libmdbx/issues/132 .
Change-Id: I1f84a2be1fa5da6cf0e2783ff56f7a4c20782a7f
2020-12-04 15:38:15 +03:00
Leonid Yuriev
d9bd306da3
mdbx-load: add -p
option (purge subDB).
...
Change-Id: I678950c99c8b4aea1add4ce548c9b4fe4ab8bfe6
2020-12-03 21:52:22 +03:00
Leonid Yuriev
90309ec0bf
mdbx: merge branch 'master' into devel.
...
Change-Id: Ib1d07cf6eb2e4c76b3be969b28bf2317cb326835
2020-12-03 18:42:10 +03:00
Leonid Yuriev
eb31b765a5
mdbx-tools: use MDBX_SAFE_NOSYNC | MDBX_ACCEDE
inside mdbx_load
.
...
Change-Id: Id5a3a447d6b80b96a97ec76c258825583546d791
2020-12-03 17:58:21 +03:00
Leonid Yuriev
76716c23b0
mdbx: add MDBX_opt_txn_dp_initial
& MDBX_opt_txn_dp_limit
.
...
More for https://github.com/erthink/libmdbx/issues/128
Change-Id: I4be3c7476e9ce16ed4f27691d0df653552930e3c
2020-12-03 17:17:30 +03:00
Leonid Yuriev
84235c7903
mdbx: drop unnecessary MDBX_HUGE_TRANSACTIONS
option.
...
Change-Id: I86116c2bada268d6e0a5c97deff808aaffe3e599
2020-12-03 17:17:28 +03:00
Leonid Yuriev
c5061f9289
mdbx: dynamic dirty-page-list size.
...
Resolve https://github.com/erthink/libmdbx/issues/123
Change-Id: I5d9b2d8c2259132617fd2b226b9d9a6790fcad88
2020-12-03 17:17:07 +03:00
Leonid Yuriev
6a5cec1f87
mdbx: refine mdbx_dpl_search()
.
...
Change-Id: I8acc87d9c2f306c981ad42cc859d32b7cfd7330e
2020-12-03 10:25:36 +03:00
Leonid Yuriev
d8d89cca7d
mdbx: refactor dirty-page-list (preparation to rework).
...
Change-Id: Ib52bb52f73ef1d31f55838d879de081fc0a140c2
2020-12-03 10:25:36 +03:00
Leonid Yuriev
7210f994fb
mdbx-windows: fix mdbx_realloc()
for nullptr and MDBX_AVOID_CRT=ON
.
...
Change-Id: I129221186d65254da5b1d84747e5c59d53864b70
2020-12-03 10:25:24 +03:00
Leonid Yuriev
a987301204
mdbx++: refine abort/commit.
...
More for https://github.com/erthink/libmdbx/pull/143
Change-Id: I07de4c43d039f904495f0f4caf586d8764174dcf
2020-12-03 09:32:25 +03:00
sasgas
5c693ccd96
mdbx++: fix missing null assignment.
...
Resolves https://github.com/erthink/libmdbx/pull/143
Change-Id: Ifb88cebe2f07297a2f6cf70e31ae6abe61a0c0b2
2020-12-03 09:17:36 +03:00
Leonid Yuriev
5636dbf12b
mdbx: add mdbx_dpl_alloc()
& mdbx_dpl_free()
.
...
Change-Id: I0f05ff02d4a45d02faa1076cbb1a2a8e17b7e2b9
2020-12-02 20:07:59 +03:00
Leonid Yuriev
c530c83337
mdbx: drop me_dirtylist
field.
...
Change-Id: I93ee802c1b6ef5c6a2443e19754e1a20dbe0aea9
2020-12-02 20:07:59 +03:00
Leonid Yuriev
0b62453f6d
mdbx: introduce MDBX_PGL_LIMIT
.
...
Change-Id: Ifab1156ec22fb0908284298393f52c09c0731829
2020-12-02 20:07:59 +03:00
Leonid Yuriev
4cd08f0ef9
mdbx: add MDBX_opt_rp_augment_limit
.
...
More for https://github.com/erthink/libmdbx/issues/128
Change-Id: I94f3350b72ad11d0b586aaef1574f7654223bc40
2020-12-02 20:07:55 +03:00
Leonid Yuriev
461ba000e3
mdbx: add MDBX_opt_dp_reserve_limit
.
...
More for https://github.com/erthink/libmdbx/issues/128
Change-Id: I620b6dcd833fcff19680770974f32431ab91c0ab
2020-12-02 12:42:16 +03:00
Leonid Yuriev
42019e0b8d
mdbx: add dp_reserve_limit
with 1024 default.
...
More for More for https://github.com/erthink/libmdbx/issues/128
Change-Id: Ia92b1aea58640f183202495e3f6e2d531057afd2
2020-12-02 12:42:16 +03:00
Leonid Yuriev
8f60050991
mdbx: initial support for set/get_options.
...
Initial for https://github.com/erthink/libmdbx/issues/128
Change-Id: I540784c8b54d7443748e3c95f89a7390b818c811
2020-12-02 12:42:13 +03:00
Leonid Yuriev
a8ed534cd3
mdbx: avoid 4-byte aligned (i.e. unaligned) access to 64-bit integers.
...
Historically, the page header provides 4-byte data alignment.
Therefore, unfortunately, the meta page data is also aligned on a 4-byte boundary, but contains 64-bit values.
This commit eliminates potentially unsafe access (SPARC, MIPS, etc) to these 64-bit values aligned on a 4-byte boundary.
Thus, a build with the `-fsanitize=undefined` now passes the tests both with CLANG 11 and GCC 10.
Change-Id: Ie441103e53ed96fd40507d8c0be0689e3fee69f5
2020-12-01 20:23:23 +03:00
Leonid Yuriev
adcb052915
mdbx: fix minor MSVC warnings.
2020-11-29 06:04:55 +03:00
Leonid Yuriev
2dab009e76
mdbx-windows: handling EXCEPTION_POSSIBLE_DEADLOCK
.
...
Change-Id: If42c7833e9c4e02fef25634e69c0bd2e926686c1
2020-11-29 05:49:15 +03:00
Leonid Yuriev
6d2914c99b
mdbx: minor/insignificant fix checking mdbx_rdt_lock()
result for cases mutex-recovery after EOWNERDEAD
.
...
Change-Id: Ia5e13ea0d72afc97f7d678832a765a192dfacdff
2020-11-25 17:55:29 +03:00
Leonid Yuriev
2a740d3807
mdbx-windows: fix ERROR_NOT_SUPPORTED
while opening UNC pathnames.
...
Resolve https://github.com/miranda-ng/miranda-ng/issues/2627
Change-Id: Iec06554dfcb9e0db215662d93fb5824cfe9ac7ef
2020-11-24 15:53:14 +03:00
Leonid Yuriev
23fd4444b5
mdbx-windows: remap whole section for mmap-resize if NtExtendSection()
not available (Wine).
...
Some workaround for https://github.com/miranda-ng/miranda-ng/issues/1209
Change-Id: I8ce3cb0fb8bdc9bd36a05ab53343efbe4080d1f3
2020-11-23 10:47:07 +03:00
Leonid Yuriev
ddee04d991
mdbx: set DXB/LCK files position outside of a data.
...
Set the position in files outside of the data to avoid corruption
due to erroneous use of file descriptors in the application code.
Change-Id: I8750f6e726edaddee254885756d5f91576a6bcb1
2020-11-23 09:25:24 +03:00
Leonid Yuriev
f76bf72021
mdbx-windows: retry resize-mmap always with reservation (less chance to failure).
...
Change-Id: I472651f6906b88ba674868e0cd6c81318bfc255b
2020-11-20 11:52:44 +03:00
Leonid Yuriev
537e3d18ae
mdbx: minor clarify mmap-resize logging.
...
Change-Id: Ibb6e4b8ee84d03a22ad0e0d1b437989739d43bb9
2020-11-20 10:38:04 +03:00
Leonid Yuriev
1bbf20bf39
mdbx: refine multi-thread flipping of buffers during env-copy.
...
Change-Id: Id132c1af0e1131da70ab1b35bce9f6a6548edbe3
2020-11-19 11:59:42 +03:00
Leonid Yuriev
9054b25441
mdbx: fix fast completion of nested txn for case ones was open present DBIs.
...
Change-Id: I87d28d1da5f72cc7ad77f8dd3f9a181f7eaa0024
2020-11-19 09:26:33 +03:00
Leonid Yuriev
862cfb9a3b
mdbx-windows: refine WSL1 detection.
...
Try to fix https://github.com/snej/nimdbx/issues/1
Change-Id: Iec1c77c82ced8095e3f4e03a27a58e0bba3df76b
2020-11-18 22:38:26 +03:00
Leonid Yuriev
26767a5e06
mdbx: relax big-page size checking for compatibility.
...
i.e. allow an overflow page be larger than required by placed data.
2020-11-18 03:42:05 +03:00
Leonid Yuriev
96c2a56aa1
mdbx: use MDBX_SET_LOWERBOUND
in mdbx_get_equal_or_great()
.
...
Change-Id: I5dd72fe82bd15938afc60cbc0f92e23c00f0d344
2020-11-17 08:13:46 +03:00
Leonid Yuriev
5e02e7fb56
mdbx: add MDBX_SET_LOWERBOUND
for mdbx_cursor_get()
.
...
Change-Id: I3638fdd10be8dfe128c43b465e9ca71f89175b3e
2020-11-17 08:13:46 +03:00
Leonid Yuriev
9ea6922a2f
mdbx: minor simplify mdbx_cursor_set()
.
...
Change-Id: I034f396368024af21e8ee741c13a28c9bc277121
2020-11-17 07:59:51 +03:00
Leonid Yuriev
56a52b0b01
mdbx: merge branch 'fix-131' (early part) into devel.
...
Change-Id: I0df5ffa9f06da1196a60d5a7c68fed59b7027e4c
2020-11-16 07:07:53 +03:00
Leonid Yuriev
149b3d09e6
mdbx: don't export DBIs from nested txn.
...
Change-Id: I8c354ac7f889debe2fcf830263cb060253887652
2020-11-16 07:07:39 +03:00
Leonid Yuriev
1c925a0f2e
mdbx: minor fix/avoid assertion inside mdbx_cursor_set()
.
...
Change-Id: I2cc38da698765b3eaa2bb575e16505d5d9438431
2020-11-16 07:07:39 +03:00
Leonid Yuriev
0c3deac9db
mdbx: fix cursors-EOF after search.
...
Change-Id: Ie578611b64cca8dbcc00f958510143e8d1dc262a
2020-11-16 07:07:39 +03:00
Leonid Yuriev
21bbba82fb
mdbx: minor fix cursor_on_first/last for empty sub-db.
...
Change-Id: I68c2e1bd28e62c9512bf8ef711fe21573e3450b9
2020-11-16 07:07:39 +03:00
Leonid Yuriev
4ea2bea22e
mdbx: fix save/restore/commit cursors for nested txn.
...
Change-Id: Ibaf356bbc631ca2e41058787bd3e4aaaa8bc085a
2020-11-16 07:07:38 +03:00
Leonid Yuriev
e328c1f829
mdbx: refactor/move mdbx_cursor_count()
.
...
Change-Id: I5487342013dfc3a9cf12d9081471ace0c37de23d
2020-11-16 07:07:38 +03:00
Leonid Yuriev
ca115dd6a4
mdbx: refactor/rename/refine tw.cursors
internals.
...
Change-Id: Ie46d15f52a9d7365b52534a630754a31d3005a69
2020-11-16 07:07:38 +03:00
Leonid Yuriev
9a2dbb845c
mdbx: refactor/refine cursor next/prev.
...
Change-Id: I0bfe0fed62e137e933027ba90cec23dbf1a6310b
2020-11-16 07:07:38 +03:00
Leonid Yuriev
5f09ec73c9
mdbx: return MDBX_ENODATA
instead of MDBX_EINVAL
for non-positioned/EOF cursor and MDBX_GET_CURRENT
.
...
Change-Id: I2adf76f8f662e77e5a6aa077344fab6b430975c4
2020-11-16 07:07:38 +03:00
Leonid Yuriev
c55f99073b
mdbx: fix MDBX_NEXT
for EOF case.
...
Change-Id: I84c033a24d2215a4867affab5b148bf6ba5d57dc
2020-11-16 07:07:38 +03:00
Leonid Yuriev
b1446b7752
mdbx: minor fix/distinction MDBX_EBADSIGN
and MDBX_EINVAL
errors for cursors.
...
Change-Id: I6d72638a69ff0f793156fe5e0e7ca5531a97c7cf
2020-11-16 07:07:38 +03:00
Leonid Yuriev
b6f0070f85
mdbx: add mdbx_cursor_copy()
.
...
Change-Id: I476f1230beec6a550897bef236745530154c1079
2020-11-16 07:07:38 +03:00
Leonid Yuriev
2489e0ba6e
mdbx: refactor/rename cursor_copy_internal()
.
...
Change-Id: I334e68d3d424ef15cafcaafd23d61f80611fce01
2020-11-16 07:07:38 +03:00
Leonid Yuriev
459e769844
mdbx: engage cursor tracking for all merge/rebalance operations.
...
Assume this resolves https://github.com/erthink/libmdbx/issues/131 .
Change-Id: I5111618a34d91d083b81245ac959b744a86c4495
2020-11-16 07:07:27 +03:00
Leonid Yuriev
37a1d546b7
mdbx: minor refine mdbx_rebalance()
.
...
Change-Id: I10a6a208b173bdee1d325aa7b2624de879814647
2020-11-16 06:28:11 +03:00
Leonid Yuriev
b209e91ad4
mdbx: zeroed mc_top
while tracking nested cursors.
...
This avoids scanning dummy cursors during tracking.
Change-Id: Id4edc665010215b4a946f9438475691f1387313c
2020-11-16 05:48:44 +03:00
Leonid Yuriev
0c78da99b0
mdbx: add cursor_is_tracked()
and assertions.
...
Change-Id: I83db1a714597b134aa30e4ca7019bb7f541a2428
2020-11-16 05:48:23 +03:00
Leonid Yuriev
10681a53ae
mdbx: cleanup/refine GC-flags inside mdbx_page_alloc()
.
...
Change-Id: Ie81c703815a7b3fbe59ad9b406811d5ed2913d02
2020-11-16 05:43:53 +03:00
Leonid Yuriev
06691aeafc
mdbx-load: fix/preserve DB geometry without the mapsize
header item.
...
More for https://github.com/erthink/libmdbx/issues/136 .
Change-Id: I385869f2894ebe83b00b4e5b7ac4cacaabaf25d9
2020-11-16 00:53:34 +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
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
5ad167410c
mdbx: fix handling MDBX_GET_BOTH_RANGE
.
...
Partially revert 77e84ccca8d634db087fc710b1c4aea69ee5a6a6 and 7522246ccdb3c1b0928aa3e0f593133db0fadae5.
Resolves https://github.com/erthink/libmdbx/issues/130
Change-Id: Ib9f49a3e6a108a0d914ccde7ccb4dc0ef6056ff7
2020-10-31 20:54:53 +03:00
Leonid Yuriev
70241e25db
mdbx: don't limit reclaimed-pglist if DB full.
...
More for 55d190bad9723fd9766466005b1a14e70779fc89 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
faddc71eac
mdbx-tools: cleanup/refine mdbx_dump
& mdbx_load
.
2020-10-27 01:08:01 +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
77e84ccca8
mdbx: refine mdbx_cursor_set()
around the exact-flag.
...
Change-Id: Ifbad6bb4a3a4eabaf85c7986f9566705d53c45b9
2020-10-26 03:52:07 +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
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
Leonid Yuriev
b0928219c3
mdbx: fast completion pure nested transactions.
...
Change-Id: I467cc0f2f3e781bf23bf8c45eb021987ae7c123b
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
b964b2abf5
mdbx: more spelling.
...
Change-Id: I45e42c1d8ef51f910b8e41279b92e54a6b2ce772
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
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
1d71c677f6
mdbx++: add env::remove()
method.
...
Change-Id: If0396d38738df88d054eb8fb752c7bd3afbd8487
2020-10-10 18:31:15 +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
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
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
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
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
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
5374d06d92
mdbx: fix minor MSVC warning.
...
Change-Id: Ie3c9fa7ba21cd88f7a0c08a1529542ba394fe9c8
2020-09-29 20:59:55 +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
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
5627521f16
mdbx++: more spelling.
...
Change-Id: I3f33e695fb918c6a57c39047bba54a72ecb9bc5b
2020-09-27 17:01:59 +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
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
a7a8631bc3
mdbx: allow sync_file_range() to fail for Valgrind/QEMU cases.
...
Change-Id: I9aa77d1debfbd0cb18e940946533e4ed758d08e8
2020-09-21 17:18:07 +03:00
Leonid Yuriev
c01750be2e
mdbx: provide MDBX_USE_SYNCFILERANGE option.
...
Change-Id: Icf1f27d6203653b4e2f2180a59a65e958c4d5e2e
2020-09-21 17:18:07 +03:00
Leonid Yuriev
a2e2e5c8a0
mdbx: allow sendfile() and copy_file_range() to fail for Valgrind/QEMU cases.
...
Change-Id: I37ee8d652d91a8d2106c782beceaacb13e9f667f
2020-09-21 03:29:38 +03:00
Leonid Yuriev
25e3968199
mdbx: provide MDBX_USE_SENDFILE and MDBX_USE_SENDFILE options.
...
Change-Id: Icd9a6487ae6e398276a9e720926ff24de5897c1a
2020-09-20 20:16:26 +03:00
Leonid Yuriev
765a18ed59
mdbx_chk: support for checking using specified meta-page.
...
Change-Id: Iadb930154acb966f03aa1dec9cc7cbdc76779f05
2020-09-19 02:55:19 +03:00
Leonid Yuriev
d9daf2944d
mdbx: add env_open_for_recovery() (squashed).
...
Change-Id: I0151b21610def433745c33d1f6e0b66ce655d1a9
2020-09-19 01:48:24 +03:00
Leonid Yuriev
b321f67ed2
mdbx: Merge branch 'master' into devel.
...
Change-Id: I4f180753fe52b54f37f4fd12af2ba1b3ca541726
2020-09-19 01:47:12 +03:00
Leonid Yuriev
73647a5e46
mdbx: fix/refine mdbx_walk_tree() for working with invalid/corrupted DB.
...
Change-Id: I2594b785f675319027ff129d12683c4392e6e2f4
2020-09-19 01:44:21 +03:00
Leonid Yuriev
6a99303ec1
mdbx: fix mdbx_strerror() for MDBX_BUSY error.
...
Change-Id: Iea02f1daa3f52a9b737366e9af3c7def748ab523
2020-09-18 23:57:35 +03:00