12 Commits

Author SHA1 Message Date
Леонид Юрьев (Leonid Yuriev)
fd7aaf5f35 mdbx: добавление ошибки MDBX_BACKLOG_DEPLETED и соответствующей логики в page_alloc_slowpath(). 2022-12-09 18:07:16 +03:00
Леонид Юрьев (Leonid Yuriev)
da023657f5 mdbx: переработка внутренних флагов связанных с выделением страниц из GC. 2022-11-23 00:56:09 +03:00
Леонид Юрьев (Leonid Yuriev)
f680c99116 mdbx: переделка page_alloc_slowpath() с добавлением профилирования GC. 2022-11-07 00:44:37 +03:00
Леонид Юрьев (Leonid Yuriev)
d4ef9bf233 mdbx: rework page validation/checking, add MDBX_VALIDATION option (squashed).
Здесь основная часть изменений преобразующих отладочную проверку страниц
в регулярный и доступный пользователю осторожный/безопасный режим работы
с потенциально поврежденной БД.

Here the major part of the changes that transform a debugging check of
pages into a regular and user-accessible careful/safe mode for working
with a potentially corrupted database.
2022-07-07 14:10:09 +03:00
Леонид Юрьев (Leonid Yuriev)
c5f1f73fca mdbx: avoid extra looping inside mdbx_page_alloc() for mdbx_prep_backlog(). 2022-02-15 03:17:05 +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
6134220b8a mdbx: drop P_KEEP flag and use LRU-label insted of.
Related to https://github.com/erthink/libmdbx/issues/186

Change-Id: Ifd3bd2533b40525dd5b0aa05df421c87462c2439
2021-04-28 23:37:48 +03:00
Leonid Yuriev
9b80da87f0 mdbx-docs: update bits.md
Change-Id: Id6cfd9579f31b862f3dc0069862019d08f363f9e
2021-04-23 16:06:23 +03:00
Leonid Yuriev
d1561dc357 mdbx: refactoring page_alloc() result type.
Change-Id: I4afc73603d610e4e28b952a38dfa9f30d56809bf
2021-04-18 10:24:22 +03:00
Leonid Yuriev
105947b50c mdbx: minor refine internals comments/docs.
Change-Id: Ie1dd2233259948b4906e66fb191832dbc6526c47
2020-10-29 00:55:12 +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
7ba13d8e72 mdbx: add internal bits/flags table.
Change-Id: Ia9d0e9f678b51d8ffd1830998e9cd5d04c749974
2020-10-10 00:52:41 +03:00