Leonid Yuriev
7da64b725d
mdbx: perform madvise only for the first process opens a DB.
2021-07-16 16:03:49 +03:00
Leonid Yuriev
8aaf5d071b
mdbx: fix pagecheck()
.
...
Added a check that the data of the BIGDATA node (containing the target page number) is located within the boundaries of the page being checked.
The third case of https://github.com/erthink/libmdbx/issues/217 .
2021-07-16 15:55:18 +03:00
Leonid Yuriev
b6233ae2e5
mdbx-tools: minor fix/unify error counters.
2021-07-14 10:29:54 +03:00
Leonid Yuriev
fe5f008d39
mdbx-tools: skip iteration & checking records if corresponding tree is corrupted.
...
Hope final for https://github.com/erthink/libmdbx/issues/217
2021-07-14 03:59:56 +03:00
Leonid Yuriev
c8743cb9c4
mdbx: fix null-deref while override invalid meta-pages.
...
Related to https://github.com/erthink/libmdbx/issues/217
2021-07-14 03:59:52 +03:00
Leonid Yuriev
4de2dcebb5
mdbx: increase the MDBX_READERS_LIMIT
to 32767
.
...
Fixes https://github.com/erthink/libmdbx/issues/219 .
2021-07-11 02:44:19 +03:00
Leonid Yuriev
678a80dd19
mdbx: fix hang/shutdown on big-endian platforms without __cxa_thread_atexit()
.
...
Change-Id: I1bf706abaaf42d5b40751d85ed7c7a83d02acaf5
2021-07-11 02:25:39 +03:00
Leonid Yuriev
c18bf4f898
mdbx: minor clarify mdbx_mapresize()
.
2021-07-11 02:25:39 +03:00
Leonid Yuriev
728e7f92b2
mdbx: minor fix mdbx_mresize()
to preserve result code for read-only cases.
2021-07-11 02:25:39 +03:00
Leonid Yuriev
1740043678
mdbx: minimize the size of poisoned/unpoisoned regions to avoid ASAN hangs.
...
More for second case of https://github.com/erthink/libmdbx/issues/217
2021-07-11 02:25:26 +03:00
Leonid Yuriev
891d68838a
mdbx: return MDBX_TOO_LARGE
under Valgrind/ASAN if being opened DB is 100 larger than RAM.
...
More for second case of https://github.com/erthink/libmdbx/issues/217
2021-07-11 02:25:07 +03:00
Leonid Yuriev
108398c213
mdbx: refine rollback while opening weak/invalid DB.
...
More for https://github.com/erthink/libmdbx/issues/217
2021-07-11 02:24:51 +03:00
Leonid Yuriev
8bdee27248
mdbx: create/refactoring override_meta()
.
2021-07-11 02:24:51 +03:00
Leonid Yuriev
00c6dc9788
mdbx: re-verify head
and steady
meta-pages while opening db by the first process.
...
Basic fix for https://github.com/erthink/libmdbx/issues/217
2021-07-11 02:24:06 +03:00
Leonid Yuriev
fb67682a79
mdbx: refine mdbx_validate_meta()
.
2021-07-10 17:24:26 +03:00
Leonid Yuriev
5ed50a4739
mdbx: remove filesize
arg from header/meta read functions (refactoring).
2021-07-10 16:10:30 +03:00
Leonid Yuriev
c30c3def8b
mdbx: the filesize
field of mdbx_mmap_t
now is not specific for Windows.
2021-07-10 16:10:30 +03:00
Леонид Юрьев (Leonid Yuriev)
2f74f405ae
mdbx: avoid returning MDBX_TXN_FULL
error when possible.
2021-07-09 18:29:31 +03:00
Leonid Yuriev
39c5e66ed1
mdbx: fix safe64_reset()
for platforms without atomic 64-bit compare-and-swap.
2021-07-09 17:44:27 +03:00
Leonid Yuriev
bd2bb51f0f
mdbx++: rework buffer::silo
to avoid use std::string
.
2021-07-06 13:45:26 +03:00
Leonid Yuriev
cf5f31c577
mdbx: make __cold
attribute first (cosmetic).
2021-07-03 01:51:04 +03:00
Leonid Yuriev
fa49e5a57b
mdbx++: rename slice::from/to_FOO_bytes()
to `slice::envisage_from/to_FOO_length()'.
2021-07-02 21:20:04 +03:00
Leonid Yuriev
5d4281fbbe
mdbx: minor fix spelling.
2021-06-26 18:54:00 +03:00
Leonid Yuriev
a5e10b4ea1
mdbx: minor refine mdbx_cursor_eof()
.
2021-06-18 01:17:48 +03:00
Leonid Yuriev
b8e621cb2f
mdbx: mdbx: avoid log a warning about empty header during DB creation.
...
Resolve https://github.com/erthink/libmdbx/issues/205 .
2021-06-18 01:09:26 +03:00
Leonid Yuriev
5db855d728
mdbx: fix false-negative mdbx_cursor_eof()
result.
...
Fixes https://github.com/erthink/libmdbx/issues/207 .
2021-06-17 21:44:24 +03:00
Leonid Yuriev
d7c06b1337
mdbx: partial fix for recursive SRW-lock with MDBX_NOTLS
on Windows.
...
Here are some changes to avoid recursive acquisition of SRW-lock,
which is still in use:
- Read transactions don't acquire the shared SRW-lock with `MDBX_NOTLS.
- Memory-mapping of DB is always kept while DB opened,
therefore following limitations are:
- DB file can't be shrinked while it used,
including auto-shrink due to auto-compactification with corresponding geometry settings.
- The upper limit of DB size can't be changed while DB is used.
- The DB can grow within the upper size limit defined while opening by a first process,
but this does not work under Wine since there is no `NtExtendSection()` function.
Partially fix https://github.com/erthink/libmdbx/issues/203
2021-06-10 13:42:30 +03:00
Leonid Yuriev
0cd1eac6a8
mdbx: don't check other meta pages if one is specified for verification/recovery.
...
Fixes https://github.com/erthink/libmdbx/issues/202
2021-06-08 20:27:18 +03:00
Leonid Yuriev
f951f246b8
mdbx: allow to predefine/override MDBX_BUILD_TIMESTAMP
for builds reproducibility.
...
Resolve https://github.com/erthink/libmdbx/issues/201
2021-06-02 14:50:22 +03:00
Leonid Yuriev
ea1fcc2246
mdbx: fix insignificantly Coverity warnings.
2021-05-28 00:54:11 +03:00
Leonid Yuriev
8915db5f83
mdbx-tools: cleanup MDBX_NOSUBDIR
(needless).
2021-05-28 00:36:24 +03:00
Leonid Yuriev
a7167ce715
mdbx: allow open DB on 9P/WSL2 filesystem in exclusive mode.
...
Related to https://github.com/erthink/libmdbx/issues/97
2021-05-26 21:08:37 +03:00
Leonid Yuriev
3e0c7758ef
mdbx: fallback to non-OFD locks after EINVAL
.
...
Related to https://github.com/erthink/libmdbx/issues/97
2021-05-26 20:33:55 +03:00
Leonid Yuriev
b0830db25a
mdbx: add 9P
(WSL2 DrvFs) to blacklist of remote filesystems.
...
Related to https://github.com/erthink/libmdbx/issues/97
2021-05-26 20:33:08 +03:00
Leonid Yuriev
bcc546bdfa
mdbx-windows: refix WSL1/WSL2 detection.
...
Refix https://github.com/erthink/libmdbx/issues/97
2021-05-25 15:18:15 +03:00
Leonid Yuriev
6bedb02ac0
mdbx: fix lru-counter overflow by module 2^31.
...
2 of 2 fixes for https://github.com/erthink/libmdbx/issues/195
2021-05-20 17:42:22 +03:00
Leonid Yuriev
bc6a690733
mdbx: simplify & fix mdbx_txn_keep()
and mdbx_cursor_keep()
.
...
1 of 2 fixes for https://github.com/erthink/libmdbx/issues/195
2021-05-20 15:10:38 +03:00
Leonid Yuriev
84b699a47c
mdbx: fix elsif
typo.
2021-05-18 22:44:31 +03:00
Leonid Yuriev
841fc15dd3
mdbx: little more likely/unlikely.
2021-05-12 19:24:19 +03:00
Leonid Yuriev
0875d16656
mdbx: fix/refine mdbx_env_info_ex()
to distinguish a not-available and overflow cases for returned timestamps.
2021-05-12 17:51:31 +03:00
Leonid Yuriev
9c7c709b3e
mdbx: avoid underflow during monotime/16dot16 conversion.
2021-05-12 17:44:18 +03:00
Leonid Yuriev
c5268f1da7
mdbx-tools: add support of page operations stat to mdbx_stat
.
2021-05-12 14:41:09 +03:00
Leonid Yuriev
16d686bc42
mdbx: account msync/fsync write in page operations.
2021-05-12 14:40:58 +03:00
Leonid Yuriev
137f80e177
mdbx: refile rollback-writes inside mdbx_setup_dxb()
.
2021-05-12 14:40:58 +03:00
Leonid Yuriev
7d8099fc77
mdbx: refine mdbx_wipe_steady()
.
2021-05-12 14:40:58 +03:00
Leonid Yuriev
5731ad11c8
mdbx: don't use bool flags for mdbx_msync()
.
2021-05-12 14:40:58 +03:00
Leonid Yuriev
76b9cb5dcc
mdbx-tools: minor refine built-in usage/help.
2021-05-12 11:33:25 +03:00
Leonid Yuriev
9746dd20df
mdbx-tools: refine/fix quiet
mode.
2021-05-12 11:33:25 +03:00
Leonid Yuriev
ebab75642e
mdbx: add public MDBX_MAYBE_UNUSED
.
...
This also should fix C++ mdbx API build by MSVC 2015.
2021-05-11 21:07:40 +03:00
Leonid Yuriev
ed58ff9f81
mdbx++: add [[maybe_unused]]
to internal functions which depends on platform and compiler features.
2021-05-11 16:53:47 +03:00