mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 19:09:54 +00:00
chore(mdbx): Bump to v0.12.6 (#2692)
This commit is contained in:
@ -1,5 +1,5 @@
|
|||||||
##
|
##
|
||||||
## Copyright 2020-2022 Leonid Yuriev <leo@yuriev.ru>
|
## Copyright 2020-2023 Leonid Yuriev <leo@yuriev.ru>
|
||||||
## and other libmdbx authors: please see AUTHORS file.
|
## and other libmdbx authors: please see AUTHORS file.
|
||||||
## All rights reserved.
|
## All rights reserved.
|
||||||
##
|
##
|
||||||
|
|||||||
@ -4,7 +4,294 @@ ChangeLog
|
|||||||
English version [by Google](https://gitflic-ru.translate.goog/project/erthink/libmdbx/blob?file=ChangeLog.md&_x_tr_sl=ru&_x_tr_tl=en)
|
English version [by Google](https://gitflic-ru.translate.goog/project/erthink/libmdbx/blob?file=ChangeLog.md&_x_tr_sl=ru&_x_tr_tl=en)
|
||||||
and [by Yandex](https://translated.turbopages.org/proxy_u/ru-en.en/https/gitflic.ru/project/erthink/libmdbx/blob?file=ChangeLog.md).
|
and [by Yandex](https://translated.turbopages.org/proxy_u/ru-en.en/https/gitflic.ru/project/erthink/libmdbx/blob?file=ChangeLog.md).
|
||||||
|
|
||||||
## v0.12.2 (Иван Ярыгин) от 2022-11-11
|
|
||||||
|
## v0.12.6 "ЦСКА" от 2023-04-29
|
||||||
|
|
||||||
|
Стабилизирующий выпуск с исправлением обнаруженных ошибок и устранением
|
||||||
|
недочетов, в день 100-летнего юбилея спортивного клуба [«ЦСКА»](https://ru.wikipedia.org/wiki/Центральный_спортивный_клуб_Армии).
|
||||||
|
|
||||||
|
```
|
||||||
|
14 files changed, 117 insertions(+), 83 deletions(-)
|
||||||
|
Signed-off-by: Леонид Юрьев (Leonid Yuriev) <leo@yuriev.ru>
|
||||||
|
```
|
||||||
|
|
||||||
|
Мелочи:
|
||||||
|
|
||||||
|
- Обновление патча для старых версий buildroot.
|
||||||
|
- Использование clang-format-16.
|
||||||
|
- Использование `enum`-типов вместо `int` для устранения предупреждений GCC 13,
|
||||||
|
что могло ломать сборку в Fedora 38.
|
||||||
|
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
## v0.12.5 "Динамо" от 2023-04-18
|
||||||
|
|
||||||
|
Стабилизирующий выпуск с исправлением обнаруженных ошибок и устранением
|
||||||
|
недочетов, в день 100-летнего юбилея спортивного общества [«Динамо»](https://ru.wikipedia.org/wiki/Динамо_(спортивное_общество)).
|
||||||
|
|
||||||
|
```
|
||||||
|
16 files changed, 686 insertions(+), 247 deletions(-)
|
||||||
|
Signed-off-by: Леонид Юрьев (Leonid Yuriev) <leo@yuriev.ru>
|
||||||
|
```
|
||||||
|
|
||||||
|
Благодарности:
|
||||||
|
|
||||||
|
- Max <maxc0d3r@protonmail.com> за сообщение о проблеме экспорта из DSO/DLL
|
||||||
|
устаревших функций API.
|
||||||
|
- [`@calvin3721`](https://t.me/calvin3721) за сообщение о проблеме работы
|
||||||
|
`MainDB` с флагами не по-умолчанию.
|
||||||
|
|
||||||
|
Исправления:
|
||||||
|
|
||||||
|
- Поправлен экспорт из DSO/DLL устаревших функций,
|
||||||
|
которые заменены на inline в текущем API.
|
||||||
|
- Устранено использование неверного компаратора при создании или пересоздании
|
||||||
|
`MainDB` с флагами/опциями предполагающим использование специфического
|
||||||
|
компаратора (не по-умолчанию).
|
||||||
|
|
||||||
|
Мелочи:
|
||||||
|
|
||||||
|
- Удалена дублирующая диагностика внутри `node_read_bigdata()`.
|
||||||
|
- Исправлены ссылки в описании `mdbx_env_set_geometry()`.
|
||||||
|
- Добавлен отдельный тест `extra/upsert_alldups` для специфического
|
||||||
|
сценария замены/перезаписи одним значением всех multi-значений
|
||||||
|
соответствующих ключу, т.е. замена всех «дубликатов» одним значением.
|
||||||
|
- В C++ API добавлены варианты `buffer::key_from()` с явным именованием по типу данных.
|
||||||
|
- Добавлен отдельный тест `extra/maindb_ordinal` для специфического
|
||||||
|
сценария создания `MainDB` с флагами требующими использования
|
||||||
|
компаратора не по-умолчанию.
|
||||||
|
- Рефакторинг проверки "когерентности" мета-страниц.
|
||||||
|
- Корректировка `osal_vasprintf()` для устранения предупреждений статических анализаторов.
|
||||||
|
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
## v0.12.4 "Арта-333" от 2023-03-03
|
||||||
|
|
||||||
|
Стабилизирующий выпуск с исправлением обнаруженных ошибок, устранением
|
||||||
|
недочетов и технических долгов. Ветка 0.12 считается готовой к
|
||||||
|
продуктовому использованию, получает статус стабильной и далее будет
|
||||||
|
получать только исправление ошибок. Разработка будет продолжена в ветке
|
||||||
|
0.13, а ветка 0.11 становится архивной.
|
||||||
|
|
||||||
|
```
|
||||||
|
63 files changed, 1161 insertions(+), 569 deletions(-)
|
||||||
|
Signed-off-by: Леонид Юрьев (Leonid Yuriev) <leo@yuriev.ru>
|
||||||
|
```
|
||||||
|
|
||||||
|
Благодарности:
|
||||||
|
|
||||||
|
- Max <maxc0d3r@protonmail.com> за сообщение о проблеме ERROR_SHARING_VIOLATION
|
||||||
|
в режиме MDBX_EXCLUSIVE на Windows.
|
||||||
|
- Alisher Ashyrov <https://t.me/a1is43ras4> за сообщение о проблеме
|
||||||
|
с assert-проверкой и содействие в отладке.
|
||||||
|
- Masatoshi Fukunaga <https://gitflic.ru/user/mah0x211> за сообщение о проблеме
|
||||||
|
`put(MDBX_UPSERT+MDBX_ALLDUPS)` для случая замены всех значений в subDb.
|
||||||
|
|
||||||
|
Исправления:
|
||||||
|
|
||||||
|
- Устранен регресс после коммита 474391c83c5f81def6fdf3b0b6f5716a87b78fbf,
|
||||||
|
приводящий к возврату ERROR_SHARING_VIOLATION в Windows при открытии БД
|
||||||
|
в режиме MDBX_EXCLUSIVE для чтения-записи.
|
||||||
|
|
||||||
|
- Добавлено ограничение размера отображения при коротком read-only файле, для
|
||||||
|
предотвращения ошибки ERROR_NOT_ENOUGH_MEMORY в Windows, которая возникает
|
||||||
|
в этом случае и совсем не информативна для пользователя.
|
||||||
|
|
||||||
|
- Произведен рефакторинг `dxb_resize()`, в том числе, для устранения срабатывания
|
||||||
|
assert-проверки `size_bytes == env->me_dxb_mmap.current` в специфических
|
||||||
|
многопоточных сценариях использования. Проверка срабатывала только в
|
||||||
|
отладочных сборках, при специфическом наложении во времени читающей и
|
||||||
|
пишущей транзакции в разных потоках, одновременно с изменением размера БД.
|
||||||
|
Кроме срабатывание проверки, каких-либо других последствий не возникало.
|
||||||
|
|
||||||
|
- Устранена проблема в `put(MDBX_UPSERT+MDBX_ALLDUPS)` для случая замены
|
||||||
|
всех значений единственного ключа в subDb. В ходе этой операции subDb
|
||||||
|
становится полностью пустой, без каких-либо страниц и именно эта
|
||||||
|
ситуация не была учтена в коде, что приводило к повреждению БД
|
||||||
|
при фиксации такой транзакции.
|
||||||
|
|
||||||
|
- Устранена излишняя assert-проверка внутри `override_meta()`.
|
||||||
|
Что в отладочных сборках могло приводить к ложным срабатываниям
|
||||||
|
при восстановлении БД, в том числе при автоматическом откате слабых
|
||||||
|
мета-страниц.
|
||||||
|
|
||||||
|
- Скорректированы макросы `__cold`/`__hot`, в том числе для устранения проблемы
|
||||||
|
`error: inlining failed in call to ‘always_inline FOO(...)’: target specific option mismatch`
|
||||||
|
при сборке посредством GCC >10.x для SH4.
|
||||||
|
|
||||||
|
Ликвидация технических долгов и мелочи:
|
||||||
|
|
||||||
|
- Исправлены многочисленные опечатки в документации.
|
||||||
|
- Доработан тест для полной стохастической проверки `MDBX_EKEYMISMATCH` в режиме `MDBX_APPEND`.
|
||||||
|
- Расширены сценарии запуска `mdbx_chk` из CMake-тестов для проверки как в обычном,
|
||||||
|
так и эксклюзивном режимах чтения-записи.
|
||||||
|
- Уточнены спецификаторы `const` и `noexcept` для нескольких методов в C++ API.
|
||||||
|
- Устранено использование стека под буферы для `wchar`-преобразования путей.
|
||||||
|
- Для Windows добавлена функция `mdbx_env_get_path()` для получения пути к БД
|
||||||
|
в формате многобайтных символов.
|
||||||
|
- Добавлены doxygen-описания для API с широкими символами.
|
||||||
|
- Устранены предупреждения статического анализатора MSVC,
|
||||||
|
все они были несущественные, либо ложные.
|
||||||
|
- Устранено ложное предупреждение GCC при сборке для SH4.
|
||||||
|
- Добавлена поддержка ASAN (Address Sanitizer) при сборке посредством MSVC.
|
||||||
|
- Расширен набор перебираемых режимов в скрипте `test/long_stochastic.sh`,
|
||||||
|
добавлена опция `--extra`.
|
||||||
|
- В C++ API добавлена поддержка расширенных опций времени выполнения `mdbx::extra_runtime_option`,
|
||||||
|
аналогично `enum MDBX_option_t` из C API.
|
||||||
|
- Вывод всех счетчиков page-operations в `mdbx_stat`.
|
||||||
|
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
## v0.12.3 "Акула" от 2023-01-07
|
||||||
|
|
||||||
|
Выпуск с существенными доработками и новой функциональностью в память о закрытом open-source
|
||||||
|
[проекте "Акула"](https://erigon.substack.com/p/winding-down-support-for-akula-project).
|
||||||
|
|
||||||
|
Добавлена prefault-запись, переделан контроль “некогерентности” unified page/buffer cache, изменена тактика слияния страниц и т.д.
|
||||||
|
Стало ещё быстрее, в некоторых сценариях вдвое.
|
||||||
|
|
||||||
|
```
|
||||||
|
20 files changed, 4508 insertions(+), 2928 deletions(-)
|
||||||
|
Signed-off-by: Леонид Юрьев (Leonid Yuriev) <leo@yuriev.ru>
|
||||||
|
```
|
||||||
|
|
||||||
|
Благодарности:
|
||||||
|
|
||||||
|
- [Alex Sharov](https://t.me/AskAlexSharov) и команде [Erigon](https://github.com/ledgerwatch/erigon) за тестирование.
|
||||||
|
- [Simon Leier](https://t.me/leisim) за сообщение о сбоях и тестирование.
|
||||||
|
|
||||||
|
Новое:
|
||||||
|
|
||||||
|
- Использование адреса [https://libmdbx.dqdkfa.ru/dead-github](https://libmdbx.dqdkfa.ru/dead-github)
|
||||||
|
для отсылки к сохранённым в web.archive.org копиям ресурсов, уничтоженных администрацией Github.
|
||||||
|
|
||||||
|
- Реализована prefault-запись при выделении страниц для read-write отображений.
|
||||||
|
Это приводит к кратному снижению системных издержек и существенному увеличению
|
||||||
|
производительности в соответствующих сценариях использования, когда:
|
||||||
|
- размер БД и объём данных существенно больше ОЗУ;
|
||||||
|
- используется режим `MDBX_WRITEMAP`;
|
||||||
|
- не-мелкие транзакции (по ходу транзакции выделяется многие сотни или тысячи страниц).
|
||||||
|
|
||||||
|
В режиме `MDBX_WRITEMAP` выделение/переиспользование страниц приводит
|
||||||
|
к page-fault и чтению страницы с диска, даже если содержимое страницы
|
||||||
|
не нужно (будет перезаписано). Это является следствием работы подсистемы
|
||||||
|
виртуальной памяти, а штатный способ лечения через `MADV_REMOVE`
|
||||||
|
работает не на всех ФС и обычно дороже получаемой экономии.
|
||||||
|
|
||||||
|
Теперь в libmdbx используется "упреждающая запись" таких страниц,
|
||||||
|
которая на системах с [unified page cache](https://www.opennet.ru/base/dev/ubc.txt.html)
|
||||||
|
приводит к "вталкиванию" данных, устраняя необходимость чтения с диска при
|
||||||
|
обращении к такой странице памяти.
|
||||||
|
|
||||||
|
Новый функционал работает в согласованности с автоматическим управлением read-ahead
|
||||||
|
и кэшем статуса присутствия страниц в ОЗУ, посредством [mincore()](https://man7.org/linux/man-pages/man2/mincore.2.html).
|
||||||
|
|
||||||
|
- Добавлена опция `MDBX_opt_prefault_write_enable` для возможности принудительного
|
||||||
|
включения/выключения prefault-записи.
|
||||||
|
|
||||||
|
- Реализован динамический выбор между сквозной записью на диск и обычной записью
|
||||||
|
с последующим [fdatasync()](https://man7.org/linux/man-pages/man3/fdatasync.3p.html)
|
||||||
|
управляемый опцией `MDBX_opt_writethrough_threshold`.
|
||||||
|
|
||||||
|
В долговечных (durable) режимах данные на диск могут быть сброшены двумя способами:
|
||||||
|
- сквозной записью через файловый дескриптор открытый с `O_DSYNC`;
|
||||||
|
- обычной записью с последующим вызовом `fdatasync()`.
|
||||||
|
|
||||||
|
Первый способ выгоднее при записи малого количества страниц и/или если
|
||||||
|
канал взаимодействия с диском/носителем имеет близкую к нулю задержку.
|
||||||
|
Второй способ выгоднее если требуется записать много страниц и/или канал
|
||||||
|
взаимодействия имеет весомую задержку (датацентры, облака). Добавленная
|
||||||
|
опция `MDBX_opt_writethrough_threshold` позволяет во время выполнения
|
||||||
|
задать порог для динамического выбора способа записи в зависимости от
|
||||||
|
объема и конкретных условия использования.
|
||||||
|
|
||||||
|
- Автоматическая установка `MDBX_opt_rp_augment_limit` в зависимости от размера БД.
|
||||||
|
|
||||||
|
- Запрещение разного режима `MDBX_WRITEMAP` между процессами в режимах
|
||||||
|
с отложенной/ленивой записью, так как в этом случае невозможно
|
||||||
|
обеспечить сброс данных на диск во всех случаях на всех поддерживаемых платформах.
|
||||||
|
|
||||||
|
- Добавлена опция сборки `MDBX_MMAP_USE_MS_ASYNC` позволяющая отключить
|
||||||
|
использование системного вызова `msync(MS_ASYNC)`, в использовании
|
||||||
|
которого нет необходимости на подавляющем большинстве актуальных ОС.
|
||||||
|
По-умолчанию `MDBX_MMAP_USE_MS_ASYNC=0` (выключено) на Linux и других
|
||||||
|
системах с unified page cache. Такое поведение (без использования
|
||||||
|
`msync(MS_ASYNC)`) соответствует неизменяемой (hardcoded) логике LMDB. В
|
||||||
|
результате, в простых/наивных бенчмарках, libmdbx опережает LMDB
|
||||||
|
примерно также как при реальном применении.
|
||||||
|
|
||||||
|
На всякий случай стоит еще раз отметить/напомнить, что на Windows
|
||||||
|
предположительно libmdbx будет отставать от LMDB в сценариях с
|
||||||
|
множеством мелких транзакций, так как libmdbx осознанно использует на
|
||||||
|
Windows файловые блокировки, которые медленные (плохо реализованы в ядре
|
||||||
|
ОС), но позволяют застраховать пользователей от массы неверных действий
|
||||||
|
приводящих к повреждению БД.
|
||||||
|
|
||||||
|
- Поддержка не-печатных имен для subDb.
|
||||||
|
|
||||||
|
- Добавлен явный выбор `tls_model("local-dynamic")` для обхода проблемы
|
||||||
|
`relocation R_X86_64_TPOFF32 against FOO cannot be used with -shared`
|
||||||
|
из-за ошибки в CLANG приводящей к использованию неверного режима `ls_model`.
|
||||||
|
|
||||||
|
- Изменение тактики слияния страниц при удалении.
|
||||||
|
Теперь слияние выполняется преимущественно с уже измененной/грязной страницей.
|
||||||
|
Если же справа и слева обе страницы с одинаковым статусом,
|
||||||
|
то с наименее заполненной, как прежде. В сценариях с массивным удалением
|
||||||
|
это позволяет увеличить производительность до 50%.
|
||||||
|
|
||||||
|
- Добавлен контроль отсутствия LCK-файлов с альтернативным именованием.
|
||||||
|
|
||||||
|
Исправления (без корректировок новых функций):
|
||||||
|
|
||||||
|
- Изменение размера отображения если это требуется для сброса данных на
|
||||||
|
диск при вызове `mdbx_env_sync()` из параллельного потока выполнения вне
|
||||||
|
работающей транзакции.
|
||||||
|
|
||||||
|
- Исправление регресса после коммита db72763de049d6e4546f838277fe83b9081ad1de от 2022-10-08
|
||||||
|
в логике возврата грязных страниц в режиме `MDBX_WRITEMAP`, из-за чего
|
||||||
|
освободившиеся страницы использовались не немедленно, а попадали в
|
||||||
|
retired-список совершаемой транзакции и происходил необоснованный рост
|
||||||
|
размера транзакции.
|
||||||
|
|
||||||
|
- Устранение SIGSEGV или ошибочного вызова `free()` в ситуациях
|
||||||
|
повторного открытия среды посредством `mdbx_env_open()`.
|
||||||
|
|
||||||
|
- Устранение ошибки совершенной в коммите fe20de136c22ed3bc4c6d3f673e79c106e824f60 от 2022-09-18,
|
||||||
|
в результате чего на Linux в режиме `MDBX_WRITEMAP` никогда не вызывался `msync()`.
|
||||||
|
Проблема существует только в релизе 0.12.2.
|
||||||
|
|
||||||
|
- Добавление подсчета грязных страниц в `MDBX_WRITEMAP` для предоставления посредством `mdbx_txn_info()`
|
||||||
|
актуальной информации об объеме изменений в процессе транзакций чтения-записи.
|
||||||
|
|
||||||
|
- Исправление несущественной опечатки в условиях `#if` определения порядка байт.
|
||||||
|
|
||||||
|
- Исправление сборки для случая `MDBX_PNL_ASCENDING=1`.
|
||||||
|
|
||||||
|
Ликвидация технических долгов и мелочи:
|
||||||
|
|
||||||
|
- Доработка поддержки авто-слияния записей GC внутри `page_alloc_slowpath()`.
|
||||||
|
- Устранение несущественных предупреждений Coverity.
|
||||||
|
- Использование единого курсора для поиска в GC.
|
||||||
|
- Переработка внутренних флагов связанных с выделением страниц из GC.
|
||||||
|
- Доработка подготовки резерва перед обновлением GC при включенном BigFoot.
|
||||||
|
- Оптимизация `pnl_merge()` для случаев неперекрывающихся объединяемых списков.
|
||||||
|
- Оптимизация поддержки отсортированного списка страниц в `dpl_append()`.
|
||||||
|
- Ускорение работы `mdbx_chk` при обработке пользовательских записей в `@MAIN`.
|
||||||
|
- Переработка LRU-отметок для спиллинга.
|
||||||
|
- Переработка контроля "некогерентности" Unified page cache для уменьшения накладных расходов.
|
||||||
|
- Рефакторинг и микрооптимизация.
|
||||||
|
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
## v0.12.2 "Иван Ярыгин" от 2022-11-11
|
||||||
|
|
||||||
Выпуск с существенными доработками и новой функциональностью
|
Выпуск с существенными доработками и новой функциональностью
|
||||||
в память о российском борце [Иване Сергеевиче Ярыгине](https://ru.wikipedia.org/wiki/Ярыгин,_Иван_Сергеевич).
|
в память о российском борце [Иване Сергеевиче Ярыгине](https://ru.wikipedia.org/wiki/Ярыгин,_Иван_Сергеевич).
|
||||||
@ -152,7 +439,7 @@ Signed-off-by: Леонид Юрьев (Leonid Yuriev) <leo@yuriev.ru>
|
|||||||
Мелочи:
|
Мелочи:
|
||||||
|
|
||||||
- Исторические ссылки cвязанные с удалённым на ~~github~~ проектом перенаправлены на [web.archive.org](https://web.archive.org/web/https://github.com/erthink/libmdbx).
|
- Исторические ссылки cвязанные с удалённым на ~~github~~ проектом перенаправлены на [web.archive.org](https://web.archive.org/web/https://github.com/erthink/libmdbx).
|
||||||
- Синхронизированны конструкции CMake между проектами.
|
- Синхронизированы конструкции CMake между проектами.
|
||||||
- Добавлено предупреждение о небезопасности RISC-V.
|
- Добавлено предупреждение о небезопасности RISC-V.
|
||||||
- Добавлено описание параметров `MDBX_debug_func` и `MDBX_debug_func`.
|
- Добавлено описание параметров `MDBX_debug_func` и `MDBX_debug_func`.
|
||||||
- Добавлено обходное решение для минимизации ложно-положительных
|
- Добавлено обходное решение для минимизации ложно-положительных
|
||||||
@ -171,10 +458,10 @@ Signed-off-by: Леонид Юрьев (Leonid Yuriev) <leo@yuriev.ru>
|
|||||||
- Fixed minor MingGW warning.
|
- Fixed minor MingGW warning.
|
||||||
|
|
||||||
|
|
||||||
-------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
## v0.12.1 (Positive Proxima) at 2022-08-24
|
## v0.12.1 "Positive Proxima" at 2022-08-24
|
||||||
|
|
||||||
The planned frontward release with new superior features on the day of 20 anniversary of [Positive Technologies](https://ptsecurty.com).
|
The planned frontward release with new superior features on the day of 20 anniversary of [Positive Technologies](https://ptsecurty.com).
|
||||||
|
|
||||||
@ -216,10 +503,54 @@ Fixes:
|
|||||||
Not a release but preparation for changing feature set and API.
|
Not a release but preparation for changing feature set and API.
|
||||||
|
|
||||||
|
|
||||||
-------------------------------------------------------------------------------
|
********************************************************************************
|
||||||
|
|
||||||
|
|
||||||
## v0.11.13 at (Swashplate) 2022-11-10
|
## v0.11.14 "Sergey Kapitsa" at 2023-02-14
|
||||||
|
|
||||||
|
The stable bugfix release in memory of [Sergey Kapitsa](https://en.wikipedia.org/wiki/Sergey_Kapitsa) on his 95th birthday.
|
||||||
|
|
||||||
|
```
|
||||||
|
22 files changed, 250 insertions(+), 174 deletions(-)
|
||||||
|
Signed-off-by: Леонид Юрьев (Leonid Yuriev) <leo@yuriev.ru>
|
||||||
|
```
|
||||||
|
|
||||||
|
Fixes:
|
||||||
|
- backport: Fixed insignificant typo of `||` inside `#if` byte-order condition.
|
||||||
|
- backport: Fixed `SIGSEGV` or an erroneous call to `free()` in situations where
|
||||||
|
errors occur when reopening by `mdbx_env_open()` of a previously used
|
||||||
|
environment.
|
||||||
|
- backport: Fixed `cursor_put_nochecklen()` internals for case when dupsort'ed named subDb
|
||||||
|
contains a single key with multiple values (aka duplicates), which are replaced
|
||||||
|
with a single value by put-operation with the `MDBX_UPSERT+MDBX_ALLDUPS` flags.
|
||||||
|
In this case, the database becomes completely empty, without any pages.
|
||||||
|
However exactly this condition was not considered and thus wasn't handled correctly.
|
||||||
|
See [issue#8](https://gitflic.ru/project/erthink/libmdbx/issue/8) for more information.
|
||||||
|
- backport: Fixed extra assertion inside `override_meta()`, which could
|
||||||
|
lead to false-positive failing of the assertion in a debug builds during
|
||||||
|
DB recovery and auto-rollback.
|
||||||
|
- backport: Refined the `__cold`/`__hot` macros to avoid the
|
||||||
|
`error: inlining failed in call to ‘always_inline FOO(...)’: target specific option mismatch`
|
||||||
|
issue during build using GCC >10.x for SH4 arch.
|
||||||
|
|
||||||
|
Minors:
|
||||||
|
|
||||||
|
- backport: Using the https://libmdbx.dqdkfa.ru/dead-github
|
||||||
|
for resources deleted by the Github' administration.
|
||||||
|
- backport: Fixed English typos.
|
||||||
|
- backport: Fixed proto of `__asan_default_options()`.
|
||||||
|
- backport: Fixed doxygen-description of C++ API, especially of C++20 concepts.
|
||||||
|
- backport: Refined `const` and `noexcept` for few C++ API methods.
|
||||||
|
- backport: Fixed copy&paste typo of "Getting started".
|
||||||
|
- backport: Update MithrilDB status.
|
||||||
|
- backport: Resolve false-posirive `used uninitialized` warning from GCC >10.x
|
||||||
|
while build for SH4 arch.
|
||||||
|
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
## v0.11.13 at "Swashplate" 2022-11-10
|
||||||
|
|
||||||
The stable bugfix release in memory of [Boris Yuryev](https://ru.wikipedia.org/wiki/Юрьев,_Борис_Николаевич) on his 133rd birthday.
|
The stable bugfix release in memory of [Boris Yuryev](https://ru.wikipedia.org/wiki/Юрьев,_Борис_Николаевич) on his 133rd birthday.
|
||||||
|
|
||||||
@ -247,7 +578,10 @@ Minors:
|
|||||||
- Use `--dont-check-ram-size` for small-tests make-targets (backport).
|
- Use `--dont-check-ram-size` for small-tests make-targets (backport).
|
||||||
|
|
||||||
|
|
||||||
## v0.11.12 (Эребуни) at 2022-10-12
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
## v0.11.12 "Эребуни" at 2022-10-12
|
||||||
|
|
||||||
The stable bugfix release.
|
The stable bugfix release.
|
||||||
|
|
||||||
@ -269,7 +603,10 @@ Minors:
|
|||||||
- Removed needless `LockFileEx()` inside `mdbx_env_copy()` (backport).
|
- Removed needless `LockFileEx()` inside `mdbx_env_copy()` (backport).
|
||||||
|
|
||||||
|
|
||||||
## v0.11.11 (Тендра-1790) at 2022-09-11
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
## v0.11.11 "Тендра-1790" at 2022-09-11
|
||||||
|
|
||||||
The stable bugfix release.
|
The stable bugfix release.
|
||||||
|
|
||||||
@ -285,7 +622,10 @@ Fixes:
|
|||||||
- Fixed derived C++ builds by removing `MDBX_INTERNAL_FUNC` for `mdbx_w2mb()` and `mdbx_mb2w()`.
|
- Fixed derived C++ builds by removing `MDBX_INTERNAL_FUNC` for `mdbx_w2mb()` and `mdbx_mb2w()`.
|
||||||
|
|
||||||
|
|
||||||
## v0.11.10 (the TriColor) at 2022-08-22
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
## v0.11.10 "the TriColor" at 2022-08-22
|
||||||
|
|
||||||
The stable bugfix release.
|
The stable bugfix release.
|
||||||
|
|
||||||
@ -315,8 +655,10 @@ Minors:
|
|||||||
- Minor clarified `iov_page()` failure case.
|
- Minor clarified `iov_page()` failure case.
|
||||||
|
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
## v0.11.9 (Чирчик-1992) at 2022-08-02
|
|
||||||
|
## v0.11.9 "Чирчик-1992" at 2022-08-02
|
||||||
|
|
||||||
The stable bugfix release.
|
The stable bugfix release.
|
||||||
|
|
||||||
@ -325,7 +667,7 @@ The stable bugfix release.
|
|||||||
Signed-off-by: Леонид Юрьев (Leonid Yuriev) <leo@yuriev.ru>
|
Signed-off-by: Леонид Юрьев (Leonid Yuriev) <leo@yuriev.ru>
|
||||||
```
|
```
|
||||||
|
|
||||||
Acknowledgements:
|
Acknowledgments:
|
||||||
|
|
||||||
- [Alex Sharov](https://github.com/AskAlexSharov) and Erigon team for reporting and testing.
|
- [Alex Sharov](https://github.com/AskAlexSharov) and Erigon team for reporting and testing.
|
||||||
- [Andrew Ashikhmin](https://gitflic.ru/user/yperbasis) for contributing.
|
- [Andrew Ashikhmin](https://gitflic.ru/user/yperbasis) for contributing.
|
||||||
@ -354,14 +696,14 @@ Minors:
|
|||||||
- Fixed `has no symbols` warning from Apple's ranlib.
|
- Fixed `has no symbols` warning from Apple's ranlib.
|
||||||
|
|
||||||
|
|
||||||
-------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
## v0.11.8 (Baked Apple) at 2022-06-12
|
## v0.11.8 "Baked Apple" at 2022-06-12
|
||||||
|
|
||||||
The stable release with an important fixes and workaround for the critical macOS thread-local-storage issue.
|
The stable release with an important fixes and workaround for the critical macOS thread-local-storage issue.
|
||||||
|
|
||||||
Acknowledgements:
|
Acknowledgments:
|
||||||
|
|
||||||
- [Masatoshi Fukunaga](https://github.com/mah0x211) for [Lua bindings](https://github.com/mah0x211/lua-libmdbx).
|
- [Masatoshi Fukunaga](https://github.com/mah0x211) for [Lua bindings](https://github.com/mah0x211/lua-libmdbx).
|
||||||
|
|
||||||
@ -407,10 +749,10 @@ Minors:
|
|||||||
- Don't provide nor report package information if used as a CMake subproject.
|
- Don't provide nor report package information if used as a CMake subproject.
|
||||||
|
|
||||||
|
|
||||||
-------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
## v0.11.7 (Resurrected Sarmat) at 2022-04-22
|
## v0.11.7 "Resurrected Sarmat" at 2022-04-22
|
||||||
|
|
||||||
The stable risen release after the Github's intentional malicious disaster.
|
The stable risen release after the Github's intentional malicious disaster.
|
||||||
|
|
||||||
@ -456,7 +798,7 @@ Minors:
|
|||||||
- Switched to using `MDBX_EPERM` instead of `MDBX_RESULT_TRUE` to indicate that the geometry cannot be updated.
|
- Switched to using `MDBX_EPERM` instead of `MDBX_RESULT_TRUE` to indicate that the geometry cannot be updated.
|
||||||
- Added `NULL` checking during memory allocation inside `mdbx_chk`.
|
- Added `NULL` checking during memory allocation inside `mdbx_chk`.
|
||||||
- Resolved all warnings from MinGW while used without CMake.
|
- Resolved all warnings from MinGW while used without CMake.
|
||||||
- Added inheretable `target_include_directories()` to `CMakeLists.txt` for easy integration.
|
- Added inheritable `target_include_directories()` to `CMakeLists.txt` for easy integration.
|
||||||
- Added build-time checks and paranoid runtime assertions for the `off_t` arguments of `fcntl()` which are used for locking.
|
- Added build-time checks and paranoid runtime assertions for the `off_t` arguments of `fcntl()` which are used for locking.
|
||||||
- Added `-Wno-lto-type-mismatch` to avoid false-positive warnings from old GCC during LTO-enabled builds.
|
- Added `-Wno-lto-type-mismatch` to avoid false-positive warnings from old GCC during LTO-enabled builds.
|
||||||
- Added checking for TID (system thread id) to avoid hang on 32-bit Bionic/Android within `pthread_mutex_lock()`.
|
- Added checking for TID (system thread id) to avoid hang on 32-bit Bionic/Android within `pthread_mutex_lock()`.
|
||||||
@ -464,24 +806,24 @@ Minors:
|
|||||||
- Added `CMAKE_HOST_ARCH` and `CMAKE_HOST_CAN_RUN_EXECUTABLES_BUILT_FOR_TARGET`.
|
- Added `CMAKE_HOST_ARCH` and `CMAKE_HOST_CAN_RUN_EXECUTABLES_BUILT_FOR_TARGET`.
|
||||||
|
|
||||||
|
|
||||||
-------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
## v0.11.6 at 2022-03-24
|
## v0.11.6 at 2022-03-24
|
||||||
|
|
||||||
The stable release with the complete workaround for an incoherence flaw of Linux unified page/buffer cache.
|
The stable release with the complete workaround for an incoherence flaw of Linux unified page/buffer cache.
|
||||||
Nonetheless the cause for this trouble may be an issue of Intel CPU cache/MESI.
|
Nonetheless the cause for this trouble may be an issue of Intel CPU cache/MESI.
|
||||||
See [issue#269](https://web.archive.org/web/https://github.com/erthink/libmdbx/issues/269) for more information.
|
See [issue#269](https://libmdbx.dqdkfa.ru/dead-github/issues/269) for more information.
|
||||||
|
|
||||||
Acknowledgements:
|
Acknowledgments:
|
||||||
|
|
||||||
- [David Bouyssié](https://github.com/david-bouyssie) for [Scala bindings](https://github.com/david-bouyssie/mdbx4s).
|
- [David Bouyssié](https://github.com/david-bouyssie) for [Scala bindings](https://github.com/david-bouyssie/mdbx4s).
|
||||||
- [Michelangelo Riccobene](https://github.com/mriccobene) for reporting and testing.
|
- [Michelangelo Riccobene](https://github.com/mriccobene) for reporting and testing.
|
||||||
|
|
||||||
Fixes:
|
Fixes:
|
||||||
|
|
||||||
- [Added complete workaround](https://web.archive.org/web/https://github.com/erthink/libmdbx/issues/269) for an incoherence flaw of Linux unified page/buffer cache.
|
- [Added complete workaround](https://libmdbx.dqdkfa.ru/dead-github/issues/269) for an incoherence flaw of Linux unified page/buffer cache.
|
||||||
- [Fixed](https://web.archive.org/web/https://github.com/erthink/libmdbx/issues/272) cursor reusing for read-only transactions.
|
- [Fixed](https://libmdbx.dqdkfa.ru/dead-github/issues/272) cursor reusing for read-only transactions.
|
||||||
- Fixed copy&paste typo inside `mdbx::cursor::find_multivalue()`.
|
- Fixed copy&paste typo inside `mdbx::cursor::find_multivalue()`.
|
||||||
|
|
||||||
Minors:
|
Minors:
|
||||||
@ -493,12 +835,15 @@ Minors:
|
|||||||
- Clarified error messages of a signature/version mismatch.
|
- Clarified error messages of a signature/version mismatch.
|
||||||
|
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
## v0.11.5 at 2022-02-23
|
## v0.11.5 at 2022-02-23
|
||||||
|
|
||||||
The release with the temporary hotfix for a flaw of Linux unified page/buffer cache.
|
The release with the temporary hotfix for a flaw of Linux unified page/buffer cache.
|
||||||
See [issue#269](https://web.archive.org/web/https://github.com/erthink/libmdbx/issues/269) for more information.
|
See [issue#269](https://libmdbx.dqdkfa.ru/dead-github/issues/269) for more information.
|
||||||
|
|
||||||
Acknowledgements:
|
Acknowledgments:
|
||||||
|
|
||||||
- [Simon Leier](https://github.com/leisim) for reporting and testing.
|
- [Simon Leier](https://github.com/leisim) for reporting and testing.
|
||||||
- [Kai Wetlesen](https://github.com/kaiwetlesen) for [RPMs](http://copr.fedorainfracloud.org/coprs/kwetlesen/libmdbx/).
|
- [Kai Wetlesen](https://github.com/kaiwetlesen) for [RPMs](http://copr.fedorainfracloud.org/coprs/kwetlesen/libmdbx/).
|
||||||
@ -506,10 +851,10 @@ Acknowledgements:
|
|||||||
|
|
||||||
Fixes:
|
Fixes:
|
||||||
|
|
||||||
- [Added hotfix](https://web.archive.org/web/https://github.com/erthink/libmdbx/issues/269) for a flaw of Linux unified page/buffer cache.
|
- [Added hotfix](https://libmdbx.dqdkfa.ru/dead-github/issues/269) for a flaw of Linux unified page/buffer cache.
|
||||||
- [Fixed/Reworked](https://web.archive.org/web/https://github.com/erthink/libmdbx/pull/270) move-assignment operators for "managed" classes of C++ API.
|
- [Fixed/Reworked](https://libmdbx.dqdkfa.ru/dead-github/pull/270) move-assignment operators for "managed" classes of C++ API.
|
||||||
- Fixed potential `SIGSEGV` while open DB with overrided non-default page size.
|
- Fixed potential `SIGSEGV` while open DB with overrided non-default page size.
|
||||||
- [Made](https://web.archive.org/web/https://github.com/erthink/libmdbx/issues/267) `mdbx_env_open()` idempotence in failure cases.
|
- [Made](https://libmdbx.dqdkfa.ru/dead-github/issues/267) `mdbx_env_open()` idempotence in failure cases.
|
||||||
- Refined/Fixed pages reservation inside `mdbx_update_gc()` to avoid non-reclamation in a rare cases.
|
- Refined/Fixed pages reservation inside `mdbx_update_gc()` to avoid non-reclamation in a rare cases.
|
||||||
- Fixed typo in a retained space calculation for the hsr-callback.
|
- Fixed typo in a retained space calculation for the hsr-callback.
|
||||||
|
|
||||||
@ -522,11 +867,14 @@ Minors:
|
|||||||
- Minor fixes Doxygen references, comments, descriptions, etc.
|
- Minor fixes Doxygen references, comments, descriptions, etc.
|
||||||
|
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
## v0.11.4 at 2022-02-02
|
## v0.11.4 at 2022-02-02
|
||||||
|
|
||||||
The stable release with fixes for large and huge databases sized of 4..128 TiB.
|
The stable release with fixes for large and huge databases sized of 4..128 TiB.
|
||||||
|
|
||||||
Acknowledgements:
|
Acknowledgments:
|
||||||
|
|
||||||
- [Ledgerwatch](https://github.com/ledgerwatch), [Binance](https://github.com/binance-chain) and [Positive Technologies](https://www.ptsecurity.com/) teams for reporting, assistance in investigation and testing.
|
- [Ledgerwatch](https://github.com/ledgerwatch), [Binance](https://github.com/binance-chain) and [Positive Technologies](https://www.ptsecurity.com/) teams for reporting, assistance in investigation and testing.
|
||||||
- [Alex Sharov](https://github.com/AskAlexSharov) for reporting, testing and provide resources for remote debugging/investigation.
|
- [Alex Sharov](https://github.com/AskAlexSharov) for reporting, testing and provide resources for remote debugging/investigation.
|
||||||
@ -542,15 +890,15 @@ New features, extensions and improvements:
|
|||||||
Fixes:
|
Fixes:
|
||||||
|
|
||||||
- Fixed handling `MDBX_opt_rp_augment_limit` for GC's records from huge transactions (Erigon/Akula/Ethereum).
|
- Fixed handling `MDBX_opt_rp_augment_limit` for GC's records from huge transactions (Erigon/Akula/Ethereum).
|
||||||
- [Fixed](https://web.archive.org/web/https://github.com/erthink/libmdbx/issues/258) build on Android (avoid including `sys/sem.h`).
|
- [Fixed](https://libmdbx.dqdkfa.ru/dead-github/issues/258) build on Android (avoid including `sys/sem.h`).
|
||||||
- [Fixed](https://web.archive.org/web/https://github.com/erthink/libmdbx/pull/261) missing copy assignment operator for `mdbx::move_result`.
|
- [Fixed](https://libmdbx.dqdkfa.ru/dead-github/pull/261) missing copy assignment operator for `mdbx::move_result`.
|
||||||
- Fixed missing `&` for `std::ostream &operator<<()` overloads.
|
- Fixed missing `&` for `std::ostream &operator<<()` overloads.
|
||||||
- Fixed unexpected `EXDEV` (Cross-device link) error from `mdbx_env_copy()`.
|
- Fixed unexpected `EXDEV` (Cross-device link) error from `mdbx_env_copy()`.
|
||||||
- Fixed base64 encoding/decoding bugs in auxillary C++ API.
|
- Fixed base64 encoding/decoding bugs in auxillary C++ API.
|
||||||
- Fixed overflow of `pgno_t` during checking PNL on 64-bit platforms.
|
- Fixed overflow of `pgno_t` during checking PNL on 64-bit platforms.
|
||||||
- [Fixed](https://web.archive.org/web/https://github.com/erthink/libmdbx/issues/260) excessive PNL checking after sort for spilling.
|
- [Fixed](https://libmdbx.dqdkfa.ru/dead-github/issues/260) excessive PNL checking after sort for spilling.
|
||||||
- Reworked checking `MAX_PAGENO` and DB upper-size geometry limit.
|
- Reworked checking `MAX_PAGENO` and DB upper-size geometry limit.
|
||||||
- [Fixed](https://web.archive.org/web/https://github.com/erthink/libmdbx/issues/265) build for some combinations of versions of MSVC and Windows SDK.
|
- [Fixed](https://libmdbx.dqdkfa.ru/dead-github/issues/265) build for some combinations of versions of MSVC and Windows SDK.
|
||||||
|
|
||||||
Minors:
|
Minors:
|
||||||
|
|
||||||
@ -567,9 +915,12 @@ Minors:
|
|||||||
- Using the `-fno-semantic interposition` option to reduce the overhead to calling self own public functions.
|
- Using the `-fno-semantic interposition` option to reduce the overhead to calling self own public functions.
|
||||||
|
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
## v0.11.3 at 2021-12-31
|
## v0.11.3 at 2021-12-31
|
||||||
|
|
||||||
Acknowledgements:
|
Acknowledgments:
|
||||||
|
|
||||||
- [gcxfd <i@rmw.link>](https://github.com/gcxfd) for reporting, contributing and testing.
|
- [gcxfd <i@rmw.link>](https://github.com/gcxfd) for reporting, contributing and testing.
|
||||||
- [장세연 (Чан Се Ен)](https://github.com/sasgas) for reporting and testing.
|
- [장세연 (Чан Се Ен)](https://github.com/sasgas) for reporting and testing.
|
||||||
@ -577,10 +928,10 @@ Acknowledgements:
|
|||||||
|
|
||||||
New features, extensions and improvements:
|
New features, extensions and improvements:
|
||||||
|
|
||||||
- [Added](https://web.archive.org/web/https://github.com/erthink/libmdbx/issues/236) `mdbx_cursor_get_batch()`.
|
- [Added](https://libmdbx.dqdkfa.ru/dead-github/issues/236) `mdbx_cursor_get_batch()`.
|
||||||
- [Added](https://web.archive.org/web/https://github.com/erthink/libmdbx/issues/250) `MDBX_SET_UPPERBOUND`.
|
- [Added](https://libmdbx.dqdkfa.ru/dead-github/issues/250) `MDBX_SET_UPPERBOUND`.
|
||||||
- C++ API is finalized now.
|
- C++ API is finalized now.
|
||||||
- The GC update stage has been [significantly speeded](https://web.archive.org/web/https://github.com/erthink/libmdbx/issues/254) when fixing huge Erigon's transactions (Ethereum ecosystem).
|
- The GC update stage has been [significantly speeded](https://libmdbx.dqdkfa.ru/dead-github/issues/254) when fixing huge Erigon's transactions (Ethereum ecosystem).
|
||||||
|
|
||||||
Fixes:
|
Fixes:
|
||||||
|
|
||||||
@ -591,18 +942,21 @@ Minors:
|
|||||||
|
|
||||||
- Fixed returning `MDBX_RESULT_TRUE` (unexpected -1) from `mdbx_env_set_option()`.
|
- Fixed returning `MDBX_RESULT_TRUE` (unexpected -1) from `mdbx_env_set_option()`.
|
||||||
- Added `mdbx_env_get_syncbytes()` and `mdbx_env_get_syncperiod()`.
|
- Added `mdbx_env_get_syncbytes()` and `mdbx_env_get_syncperiod()`.
|
||||||
- [Clarified](https://web.archive.org/web/https://github.com/erthink/libmdbx/pull/249) description of `MDBX_INTEGERKEY`.
|
- [Clarified](https://libmdbx.dqdkfa.ru/dead-github/pull/249) description of `MDBX_INTEGERKEY`.
|
||||||
- Reworked/simplified `mdbx_env_sync_internal()`.
|
- Reworked/simplified `mdbx_env_sync_internal()`.
|
||||||
- [Fixed](https://web.archive.org/web/https://github.com/erthink/libmdbx/issues/248) extra assertion inside `mdbx_cursor_put()` for `MDBX_DUPFIXED` cases.
|
- [Fixed](https://libmdbx.dqdkfa.ru/dead-github/issues/248) extra assertion inside `mdbx_cursor_put()` for `MDBX_DUPFIXED` cases.
|
||||||
- Avoiding extra looping inside `mdbx_env_info_ex()`.
|
- Avoiding extra looping inside `mdbx_env_info_ex()`.
|
||||||
- Explicitly enabled core dumps from stochastic tests scripts on Linux.
|
- Explicitly enabled core dumps from stochastic tests scripts on Linux.
|
||||||
- [Fixed](https://web.archive.org/web/https://github.com/erthink/libmdbx/issues/253) `mdbx_override_meta()` to avoid false-positive assertions.
|
- [Fixed](https://libmdbx.dqdkfa.ru/dead-github/issues/253) `mdbx_override_meta()` to avoid false-positive assertions.
|
||||||
- For compatibility reverted returning `MDBX_ENODATA`for some cases.
|
- For compatibility reverted returning `MDBX_ENODATA`for some cases.
|
||||||
|
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
## v0.11.2 at 2021-12-02
|
## v0.11.2 at 2021-12-02
|
||||||
|
|
||||||
Acknowledgements:
|
Acknowledgments:
|
||||||
|
|
||||||
- [장세연 (Чан Се Ен)](https://github.com/sasgas) for contributing to C++ API.
|
- [장세연 (Чан Се Ен)](https://github.com/sasgas) for contributing to C++ API.
|
||||||
- [Alain Picard](https://github.com/castortech) for [Java bindings](https://github.com/castortech/mdbxjni).
|
- [Alain Picard](https://github.com/castortech) for [Java bindings](https://github.com/castortech/mdbxjni).
|
||||||
@ -612,10 +966,10 @@ Acknowledgements:
|
|||||||
|
|
||||||
Fixes:
|
Fixes:
|
||||||
|
|
||||||
- [Fixed compilation](https://web.archive.org/web/https://github.com/erthink/libmdbx/pull/239) with `devtoolset-9` on CentOS/RHEL 7.
|
- [Fixed compilation](https://libmdbx.dqdkfa.ru/dead-github/pull/239) with `devtoolset-9` on CentOS/RHEL 7.
|
||||||
- [Fixed unexpected `MDBX_PROBLEM` error](https://web.archive.org/web/https://github.com/erthink/libmdbx/issues/242) because of update an obsolete meta-page.
|
- [Fixed unexpected `MDBX_PROBLEM` error](https://libmdbx.dqdkfa.ru/dead-github/issues/242) because of update an obsolete meta-page.
|
||||||
- [Fixed returning `MDBX_NOTFOUND` error](https://web.archive.org/web/https://github.com/erthink/libmdbx/issues/243) in case an inexact value found for `MDBX_GET_BOTH` operation.
|
- [Fixed returning `MDBX_NOTFOUND` error](https://libmdbx.dqdkfa.ru/dead-github/issues/243) in case an inexact value found for `MDBX_GET_BOTH` operation.
|
||||||
- [Fixed compilation](https://web.archive.org/web/https://github.com/erthink/libmdbx/issues/245) without kernel/libc-devel headers.
|
- [Fixed compilation](https://libmdbx.dqdkfa.ru/dead-github/issues/245) without kernel/libc-devel headers.
|
||||||
|
|
||||||
Minors:
|
Minors:
|
||||||
|
|
||||||
@ -626,13 +980,16 @@ Minors:
|
|||||||
- Remove unneeded `#undef P_DIRTY`.
|
- Remove unneeded `#undef P_DIRTY`.
|
||||||
|
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
## v0.11.1 at 2021-10-23
|
## v0.11.1 at 2021-10-23
|
||||||
|
|
||||||
### Backward compatibility break:
|
### Backward compatibility break:
|
||||||
|
|
||||||
The database format signature has been changed to prevent
|
The database format signature has been changed to prevent
|
||||||
forward-interoperability with an previous releases, which may lead to a
|
forward-interoperability with an previous releases, which may lead to a
|
||||||
[false positive diagnosis of database corruption](https://web.archive.org/web/https://github.com/erthink/libmdbx/issues/238)
|
[false positive diagnosis of database corruption](https://libmdbx.dqdkfa.ru/dead-github/issues/238)
|
||||||
due to flaws of an old library versions.
|
due to flaws of an old library versions.
|
||||||
|
|
||||||
This change is mostly invisible:
|
This change is mostly invisible:
|
||||||
@ -640,12 +997,12 @@ This change is mostly invisible:
|
|||||||
- previously versions are unable to read/write a new DBs;
|
- previously versions are unable to read/write a new DBs;
|
||||||
- but the new release is able to handle an old DBs and will silently upgrade ones.
|
- but the new release is able to handle an old DBs and will silently upgrade ones.
|
||||||
|
|
||||||
Acknowledgements:
|
Acknowledgments:
|
||||||
|
|
||||||
- [Alex Sharov](https://github.com/AskAlexSharov) for reporting and testing.
|
- [Alex Sharov](https://github.com/AskAlexSharov) for reporting and testing.
|
||||||
|
|
||||||
|
|
||||||
-------------------------------------------------------------------------------
|
********************************************************************************
|
||||||
|
|
||||||
|
|
||||||
## v0.10.5 at 2021-10-13 (obsolete, please use v0.11.1)
|
## v0.10.5 at 2021-10-13 (obsolete, please use v0.11.1)
|
||||||
@ -658,7 +1015,7 @@ Unfortunately, the `v0.10.5` accidentally comes not full-compatible with previou
|
|||||||
This cannot be fixed, as it requires fixing past versions, which as a result we will just get a current version.
|
This cannot be fixed, as it requires fixing past versions, which as a result we will just get a current version.
|
||||||
Therefore, it is recommended to use `v0.11.1` instead of `v0.10.5`.
|
Therefore, it is recommended to use `v0.11.1` instead of `v0.10.5`.
|
||||||
|
|
||||||
Acknowledgements:
|
Acknowledgments:
|
||||||
|
|
||||||
- [Noel Kuntze](https://github.com/Thermi) for immediately bug reporting.
|
- [Noel Kuntze](https://github.com/Thermi) for immediately bug reporting.
|
||||||
|
|
||||||
@ -674,9 +1031,12 @@ Minors:
|
|||||||
- Refined providing information for the `@MAIN` and `@GC` sub-databases of a last committed modification transaction's ID.
|
- Refined providing information for the `@MAIN` and `@GC` sub-databases of a last committed modification transaction's ID.
|
||||||
|
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
## v0.10.4 at 2021-10-10
|
## v0.10.4 at 2021-10-10
|
||||||
|
|
||||||
Acknowledgements:
|
Acknowledgments:
|
||||||
|
|
||||||
- [Artem Vorotnikov](https://github.com/vorot93) for support [Rust wrapper](https://github.com/vorot93/libmdbx-rs).
|
- [Artem Vorotnikov](https://github.com/vorot93) for support [Rust wrapper](https://github.com/vorot93/libmdbx-rs).
|
||||||
- [Andrew Ashikhmin](https://github.com/yperbasis) for contributing to C++ API.
|
- [Andrew Ashikhmin](https://github.com/yperbasis) for contributing to C++ API.
|
||||||
@ -684,7 +1044,7 @@ Acknowledgements:
|
|||||||
Fixes:
|
Fixes:
|
||||||
|
|
||||||
- Fixed possibility of looping update GC during transaction commit (no public issue since the problem was discovered inside [Positive Technologies](https://www.ptsecurity.ru)).
|
- Fixed possibility of looping update GC during transaction commit (no public issue since the problem was discovered inside [Positive Technologies](https://www.ptsecurity.ru)).
|
||||||
- Fixed `#pragma pack` to avoid provoking some compilers to generate code with [unaligned access](https://web.archive.org/web/https://github.com/erthink/libmdbx/issues/235).
|
- Fixed `#pragma pack` to avoid provoking some compilers to generate code with [unaligned access](https://libmdbx.dqdkfa.ru/dead-github/issues/235).
|
||||||
- Fixed `noexcept` for potentially throwing `txn::put()` of C++ API.
|
- Fixed `noexcept` for potentially throwing `txn::put()` of C++ API.
|
||||||
|
|
||||||
Minors:
|
Minors:
|
||||||
@ -694,9 +1054,12 @@ Minors:
|
|||||||
- In debugging builds fixed a too small (single page) by default DB shrink threshold.
|
- In debugging builds fixed a too small (single page) by default DB shrink threshold.
|
||||||
|
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
## v0.10.3 at 2021-08-27
|
## v0.10.3 at 2021-08-27
|
||||||
|
|
||||||
Acknowledgements:
|
Acknowledgments:
|
||||||
|
|
||||||
- [Francisco Vallarino](https://github.com/fjvallarino) for [Haskell bindings for libmdbx](https://hackage.haskell.org/package/libmdbx).
|
- [Francisco Vallarino](https://github.com/fjvallarino) for [Haskell bindings for libmdbx](https://hackage.haskell.org/package/libmdbx).
|
||||||
- [Alex Sharov](https://github.com/AskAlexSharov) for reporting and testing.
|
- [Alex Sharov](https://github.com/AskAlexSharov) for reporting and testing.
|
||||||
@ -710,7 +1073,7 @@ Extensions and improvements:
|
|||||||
|
|
||||||
Fixes:
|
Fixes:
|
||||||
|
|
||||||
- Always setup `madvise` while opening DB (fixes https://web.archive.org/web/https://github.com/erthink/libmdbx/issues/231).
|
- Always setup `madvise` while opening DB (fixes https://libmdbx.dqdkfa.ru/dead-github/issues/231).
|
||||||
- Fixed checking legacy `P_DIRTY` flag (`0x10`) for nested/sub-pages.
|
- Fixed checking legacy `P_DIRTY` flag (`0x10`) for nested/sub-pages.
|
||||||
|
|
||||||
Minors:
|
Minors:
|
||||||
@ -722,20 +1085,23 @@ Minors:
|
|||||||
- Fixed CMake warning about compatibility with 3.8.2
|
- Fixed CMake warning about compatibility with 3.8.2
|
||||||
|
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
## v0.10.2 at 2021-07-26
|
## v0.10.2 at 2021-07-26
|
||||||
|
|
||||||
Acknowledgements:
|
Acknowledgments:
|
||||||
|
|
||||||
- [Alex Sharov](https://github.com/AskAlexSharov) for reporting and testing.
|
- [Alex Sharov](https://github.com/AskAlexSharov) for reporting and testing.
|
||||||
- [Andrea Lanfranchi](https://github.com/AndreaLanfranchi) for reporting bugs.
|
- [Andrea Lanfranchi](https://github.com/AndreaLanfranchi) for reporting bugs.
|
||||||
- [Lionel Debroux](https://github.com/debrouxl) for fuzzing tests and reporting bugs.
|
- [Lionel Debroux](https://github.com/debrouxl) for fuzzing tests and reporting bugs.
|
||||||
- [Sergey Fedotov](https://github.com/SergeyFromHell/) for [`node-mdbx` NodeJS bindings](https://www.npmjs.com/package/node-mdbx).
|
- [Sergey Fedotov](https://github.com/SergeyFromHell/) for [`node-mdbx` NodeJS bindings](https://www.npmjs.com/package/node-mdbx).
|
||||||
- [Kris Zyp](https://github.com/kriszyp) for [`lmdbx-store` NodeJS bindings](https://github.com/kriszyp/lmdbx-store).
|
- [Kris Zyp](https://github.com/kriszyp) for [`lmdbx-store` NodeJS bindings](https://github.com/kriszyp/lmdbx-store).
|
||||||
- [Noel Kuntze](https://github.com/Thermi) for [draft Python bindings](https://web.archive.org/web/https://github.com/erthink/libmdbx/commits/python-bindings).
|
- [Noel Kuntze](https://github.com/Thermi) for [draft Python bindings](https://libmdbx.dqdkfa.ru/dead-github/commits/python-bindings).
|
||||||
|
|
||||||
New features, extensions and improvements:
|
New features, extensions and improvements:
|
||||||
|
|
||||||
- [Allow to predefine/override `MDBX_BUILD_TIMESTAMP` for builds reproducibility](https://web.archive.org/web/https://github.com/erthink/libmdbx/issues/201).
|
- [Allow to predefine/override `MDBX_BUILD_TIMESTAMP` for builds reproducibility](https://libmdbx.dqdkfa.ru/dead-github/issues/201).
|
||||||
- Added options support for `long-stochastic` script.
|
- Added options support for `long-stochastic` script.
|
||||||
- Avoided `MDBX_TXN_FULL` error for large transactions when possible.
|
- Avoided `MDBX_TXN_FULL` error for large transactions when possible.
|
||||||
- The `MDBX_READERS_LIMIT` increased to `32767`.
|
- The `MDBX_READERS_LIMIT` increased to `32767`.
|
||||||
@ -743,7 +1109,7 @@ New features, extensions and improvements:
|
|||||||
- Minimized the size of poisoned/unpoisoned regions to avoid Valgrind/ASAN stuck.
|
- Minimized the size of poisoned/unpoisoned regions to avoid Valgrind/ASAN stuck.
|
||||||
- Added more workarounds for QEMU for testing builds for 32-bit platforms, Alpha and Sparc architectures.
|
- Added more workarounds for QEMU for testing builds for 32-bit platforms, Alpha and Sparc architectures.
|
||||||
- `mdbx_chk` now skips iteration & checking of DB' records if corresponding page-tree is corrupted (to avoid `SIGSEGV`, ASAN failures, etc).
|
- `mdbx_chk` now skips iteration & checking of DB' records if corresponding page-tree is corrupted (to avoid `SIGSEGV`, ASAN failures, etc).
|
||||||
- Added more checks for [rare/fuzzing corruption cases](https://web.archive.org/web/https://github.com/erthink/libmdbx/issues/217).
|
- Added more checks for [rare/fuzzing corruption cases](https://libmdbx.dqdkfa.ru/dead-github/issues/217).
|
||||||
|
|
||||||
Backward compatibility break:
|
Backward compatibility break:
|
||||||
|
|
||||||
@ -755,23 +1121,26 @@ Backward compatibility break:
|
|||||||
Fixes:
|
Fixes:
|
||||||
|
|
||||||
- Fixed excess meta-pages checks in case `mdbx_chk` is called to check the DB for a specific meta page and thus could prevent switching to the selected meta page, even if the check passed without errors.
|
- Fixed excess meta-pages checks in case `mdbx_chk` is called to check the DB for a specific meta page and thus could prevent switching to the selected meta page, even if the check passed without errors.
|
||||||
- Fixed [recursive use of SRW-lock on Windows cause by `MDBX_NOTLS` option](https://web.archive.org/web/https://github.com/erthink/libmdbx/issues/203).
|
- Fixed [recursive use of SRW-lock on Windows cause by `MDBX_NOTLS` option](https://libmdbx.dqdkfa.ru/dead-github/issues/203).
|
||||||
- Fixed [log a warning during a new DB creation](https://web.archive.org/web/https://github.com/erthink/libmdbx/issues/205).
|
- Fixed [log a warning during a new DB creation](https://libmdbx.dqdkfa.ru/dead-github/issues/205).
|
||||||
- Fixed [false-negative `mdbx_cursor_eof()` result](https://web.archive.org/web/https://github.com/erthink/libmdbx/issues/207).
|
- Fixed [false-negative `mdbx_cursor_eof()` result](https://libmdbx.dqdkfa.ru/dead-github/issues/207).
|
||||||
- Fixed [`make install` with non-GNU `install` utility (OSX, BSD)](https://web.archive.org/web/https://github.com/erthink/libmdbx/issues/208).
|
- Fixed [`make install` with non-GNU `install` utility (OSX, BSD)](https://libmdbx.dqdkfa.ru/dead-github/issues/208).
|
||||||
- Fixed [installation by `CMake` in special cases by complete use `GNUInstallDirs`'s variables](https://web.archive.org/web/https://github.com/erthink/libmdbx/issues/209).
|
- Fixed [installation by `CMake` in special cases by complete use `GNUInstallDirs`'s variables](https://libmdbx.dqdkfa.ru/dead-github/issues/209).
|
||||||
- Fixed [C++ Buffer issue with `std::string` and alignment](https://web.archive.org/web/https://github.com/erthink/libmdbx/issues/191).
|
- Fixed [C++ Buffer issue with `std::string` and alignment](https://libmdbx.dqdkfa.ru/dead-github/issues/191).
|
||||||
- Fixed `safe64_reset()` for platforms without atomic 64-bit compare-and-swap.
|
- Fixed `safe64_reset()` for platforms without atomic 64-bit compare-and-swap.
|
||||||
- Fixed hang/shutdown on big-endian platforms without `__cxa_thread_atexit()`.
|
- Fixed hang/shutdown on big-endian platforms without `__cxa_thread_atexit()`.
|
||||||
- Fixed [using bad meta-pages if DB was partially/recoverable corrupted](https://web.archive.org/web/https://github.com/erthink/libmdbx/issues/217).
|
- Fixed [using bad meta-pages if DB was partially/recoverable corrupted](https://libmdbx.dqdkfa.ru/dead-github/issues/217).
|
||||||
- Fixed extra `noexcept` for `buffer::&assign_reference()`.
|
- Fixed extra `noexcept` for `buffer::&assign_reference()`.
|
||||||
- Fixed `bootid` generation on Windows for case of change system' time.
|
- Fixed `bootid` generation on Windows for case of change system' time.
|
||||||
- Fixed [test framework keygen-related issue](https://web.archive.org/web/https://github.com/erthink/libmdbx/issues/127).
|
- Fixed [test framework keygen-related issue](https://libmdbx.dqdkfa.ru/dead-github/issues/127).
|
||||||
|
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
## v0.10.1 at 2021-06-01
|
## v0.10.1 at 2021-06-01
|
||||||
|
|
||||||
Acknowledgements:
|
Acknowledgments:
|
||||||
|
|
||||||
- [Alexey Akhunov](https://github.com/AlexeyAkhunov) and [Alex Sharov](https://github.com/AskAlexSharov) for bug reporting and testing.
|
- [Alexey Akhunov](https://github.com/AlexeyAkhunov) and [Alex Sharov](https://github.com/AskAlexSharov) for bug reporting and testing.
|
||||||
- [Andrea Lanfranchi](https://github.com/AndreaLanfranchi) for bug reporting and testing related to WSL2.
|
- [Andrea Lanfranchi](https://github.com/AndreaLanfranchi) for bug reporting and testing related to WSL2.
|
||||||
@ -787,15 +1156,18 @@ New features:
|
|||||||
Fixes:
|
Fixes:
|
||||||
|
|
||||||
- Fixed minor "foo not used" warnings from modern C++ compilers when building the C++ part of the library.
|
- Fixed minor "foo not used" warnings from modern C++ compilers when building the C++ part of the library.
|
||||||
- Fixed confusing/messy errors when build library from unfit github's archives (https://web.archive.org/web/https://github.com/erthink/libmdbx/issues/197).
|
- Fixed confusing/messy errors when build library from unfit github's archives (https://libmdbx.dqdkfa.ru/dead-github/issues/197).
|
||||||
- Fixed `#elsif` typo.
|
- Fixed `#elsif` typo.
|
||||||
- Fixed rare unexpected `MDBX_PROBLEM` error during altering data in huge transactions due to wrong spilling/oust of dirty pages (https://web.archive.org/web/https://github.com/erthink/libmdbx/issues/195).
|
- Fixed rare unexpected `MDBX_PROBLEM` error during altering data in huge transactions due to wrong spilling/oust of dirty pages (https://libmdbx.dqdkfa.ru/dead-github/issues/195).
|
||||||
- Re-Fixed WSL1/WSL2 detection with distinguishing (https://web.archive.org/web/https://github.com/erthink/libmdbx/issues/97).
|
- Re-Fixed WSL1/WSL2 detection with distinguishing (https://libmdbx.dqdkfa.ru/dead-github/issues/97).
|
||||||
|
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
## v0.10.0 at 2021-05-09
|
## v0.10.0 at 2021-05-09
|
||||||
|
|
||||||
Acknowledgements:
|
Acknowledgments:
|
||||||
|
|
||||||
- [Mahlon E. Smith](https://github.com/mahlonsmith) for [Ruby bindings](https://rubygems.org/gems/mdbx/).
|
- [Mahlon E. Smith](https://github.com/mahlonsmith) for [Ruby bindings](https://rubygems.org/gems/mdbx/).
|
||||||
- [Alex Sharov](https://github.com/AskAlexSharov) for [mdbx-go](https://github.com/torquem-ch/mdbx-go), bug reporting and testing.
|
- [Alex Sharov](https://github.com/AskAlexSharov) for [mdbx-go](https://github.com/torquem-ch/mdbx-go), bug reporting and testing.
|
||||||
@ -813,7 +1185,7 @@ New features:
|
|||||||
and conjointly with the `MDBX_ENV_CHECKPID=0` and `MDBX_TXN_CHECKOWNER=0` options can yield
|
and conjointly with the `MDBX_ENV_CHECKPID=0` and `MDBX_TXN_CHECKOWNER=0` options can yield
|
||||||
up to 30% more performance compared to LMDB.
|
up to 30% more performance compared to LMDB.
|
||||||
- Using float point (exponential quantized) representation for internal 16-bit values
|
- Using float point (exponential quantized) representation for internal 16-bit values
|
||||||
of grow step and shrink threshold when huge ones (https://web.archive.org/web/https://github.com/erthink/libmdbx/issues/166).
|
of grow step and shrink threshold when huge ones (https://libmdbx.dqdkfa.ru/dead-github/issues/166).
|
||||||
To minimize the impact on compatibility, only the odd values inside the upper half
|
To minimize the impact on compatibility, only the odd values inside the upper half
|
||||||
of the range (i.e. 32769..65533) are used for the new representation.
|
of the range (i.e. 32769..65533) are used for the new representation.
|
||||||
- Added the `mdbx_drop` similar to LMDB command-line tool to purge or delete (sub)database(s).
|
- Added the `mdbx_drop` similar to LMDB command-line tool to purge or delete (sub)database(s).
|
||||||
@ -822,7 +1194,7 @@ New features:
|
|||||||
- The internal node sizes were refined, resulting in a reduction in large/overflow pages in some use cases
|
- The internal node sizes were refined, resulting in a reduction in large/overflow pages in some use cases
|
||||||
and a slight increase in limits for a keys size to ≈½ of page size.
|
and a slight increase in limits for a keys size to ≈½ of page size.
|
||||||
- Added to `mdbx_chk` output number of keys/items on pages.
|
- Added to `mdbx_chk` output number of keys/items on pages.
|
||||||
- Added explicit `install-strip` and `install-no-strip` targets to the `Makefile` (https://web.archive.org/web/https://github.com/erthink/libmdbx/pull/180).
|
- Added explicit `install-strip` and `install-no-strip` targets to the `Makefile` (https://libmdbx.dqdkfa.ru/dead-github/pull/180).
|
||||||
- Major rework page splitting (af9b7b560505684249b76730997f9e00614b8113) for
|
- Major rework page splitting (af9b7b560505684249b76730997f9e00614b8113) for
|
||||||
- An "auto-appending" feature upon insertion for both ascending and
|
- An "auto-appending" feature upon insertion for both ascending and
|
||||||
descending key sequences. As a result, the optimality of page filling
|
descending key sequences. As a result, the optimality of page filling
|
||||||
@ -830,7 +1202,7 @@ New features:
|
|||||||
inserting ordered sequences of keys,
|
inserting ordered sequences of keys,
|
||||||
- A "splitting at middle" to make page tree more balanced on average.
|
- A "splitting at middle" to make page tree more balanced on average.
|
||||||
- Added `mdbx_get_sysraminfo()` to the API.
|
- Added `mdbx_get_sysraminfo()` to the API.
|
||||||
- Added guessing a reasonable maximum DB size for the default upper limit of geometry (https://web.archive.org/web/https://github.com/erthink/libmdbx/issues/183).
|
- Added guessing a reasonable maximum DB size for the default upper limit of geometry (https://libmdbx.dqdkfa.ru/dead-github/issues/183).
|
||||||
- Major rework internal labeling of a dirty pages (958fd5b9479f52f2124ab7e83c6b18b04b0e7dda) for
|
- Major rework internal labeling of a dirty pages (958fd5b9479f52f2124ab7e83c6b18b04b0e7dda) for
|
||||||
a "transparent spilling" feature with the gist to make a dirty pages
|
a "transparent spilling" feature with the gist to make a dirty pages
|
||||||
be ready to spilling (writing to a disk) without further altering ones.
|
be ready to spilling (writing to a disk) without further altering ones.
|
||||||
@ -846,7 +1218,7 @@ New features:
|
|||||||
- Support `make help` to list available make targets.
|
- Support `make help` to list available make targets.
|
||||||
- Silently `make`'s build by default.
|
- Silently `make`'s build by default.
|
||||||
- Preliminary [Python bindings](https://github.com/Thermi/libmdbx/tree/python-bindings) is available now
|
- Preliminary [Python bindings](https://github.com/Thermi/libmdbx/tree/python-bindings) is available now
|
||||||
by [Noel Kuntze](https://github.com/Thermi) (https://web.archive.org/web/https://github.com/erthink/libmdbx/issues/147).
|
by [Noel Kuntze](https://github.com/Thermi) (https://libmdbx.dqdkfa.ru/dead-github/issues/147).
|
||||||
|
|
||||||
Backward compatibility break:
|
Backward compatibility break:
|
||||||
|
|
||||||
@ -861,30 +1233,30 @@ Backward compatibility break:
|
|||||||
|
|
||||||
Fixes:
|
Fixes:
|
||||||
|
|
||||||
- Fixed performance regression due non-optimal C11 atomics usage (https://web.archive.org/web/https://github.com/erthink/libmdbx/issues/160).
|
- Fixed performance regression due non-optimal C11 atomics usage (https://libmdbx.dqdkfa.ru/dead-github/issues/160).
|
||||||
- Fixed "reincarnation" of subDB after it deletion (https://web.archive.org/web/https://github.com/erthink/libmdbx/issues/168).
|
- Fixed "reincarnation" of subDB after it deletion (https://libmdbx.dqdkfa.ru/dead-github/issues/168).
|
||||||
- Fixed (disallowing) implicit subDB deletion via operations on `@MAIN`'s DBI-handle.
|
- Fixed (disallowing) implicit subDB deletion via operations on `@MAIN`'s DBI-handle.
|
||||||
- Fixed a crash of `mdbx_env_info_ex()` in case of a call for a non-open environment (https://web.archive.org/web/https://github.com/erthink/libmdbx/issues/171).
|
- Fixed a crash of `mdbx_env_info_ex()` in case of a call for a non-open environment (https://libmdbx.dqdkfa.ru/dead-github/issues/171).
|
||||||
- Fixed the selecting/adjustment values inside `mdbx_env_set_geometry()` for implicit out-of-range cases (https://web.archive.org/web/https://github.com/erthink/libmdbx/issues/170).
|
- Fixed the selecting/adjustment values inside `mdbx_env_set_geometry()` for implicit out-of-range cases (https://libmdbx.dqdkfa.ru/dead-github/issues/170).
|
||||||
- Fixed `mdbx_env_set_option()` for set initial and limit size of dirty page list ((https://web.archive.org/web/https://github.com/erthink/libmdbx/issues/179).
|
- Fixed `mdbx_env_set_option()` for set initial and limit size of dirty page list ((https://libmdbx.dqdkfa.ru/dead-github/issues/179).
|
||||||
- Fixed an unreasonably huge default upper limit for DB geometry (https://web.archive.org/web/https://github.com/erthink/libmdbx/issues/183).
|
- Fixed an unreasonably huge default upper limit for DB geometry (https://libmdbx.dqdkfa.ru/dead-github/issues/183).
|
||||||
- Fixed `constexpr` specifier for the `slice::invalid()`.
|
- Fixed `constexpr` specifier for the `slice::invalid()`.
|
||||||
- Fixed (no)readahead auto-handling (https://web.archive.org/web/https://github.com/erthink/libmdbx/issues/164).
|
- Fixed (no)readahead auto-handling (https://libmdbx.dqdkfa.ru/dead-github/issues/164).
|
||||||
- Fixed non-alloy build for Windows.
|
- Fixed non-alloy build for Windows.
|
||||||
- Switched to using Heap-functions instead of LocalAlloc/LocalFree on Windows.
|
- Switched to using Heap-functions instead of LocalAlloc/LocalFree on Windows.
|
||||||
- Fixed `mdbx_env_stat_ex()` to returning statistics of the whole environment instead of MainDB only (https://web.archive.org/web/https://github.com/erthink/libmdbx/issues/190).
|
- Fixed `mdbx_env_stat_ex()` to returning statistics of the whole environment instead of MainDB only (https://libmdbx.dqdkfa.ru/dead-github/issues/190).
|
||||||
- Fixed building by GCC 4.8.5 (added workaround for a preprocessor's bug).
|
- Fixed building by GCC 4.8.5 (added workaround for a preprocessor's bug).
|
||||||
- Fixed building C++ part for iOS <= 13.0 (unavailability of `std::filesystem::path`).
|
- Fixed building C++ part for iOS <= 13.0 (unavailability of `std::filesystem::path`).
|
||||||
- Fixed building for Windows target versions prior to Windows Vista (`WIN32_WINNT < 0x0600`).
|
- Fixed building for Windows target versions prior to Windows Vista (`WIN32_WINNT < 0x0600`).
|
||||||
- Fixed building by MinGW for Windows (https://web.archive.org/web/https://github.com/erthink/libmdbx/issues/155).
|
- Fixed building by MinGW for Windows (https://libmdbx.dqdkfa.ru/dead-github/issues/155).
|
||||||
|
|
||||||
|
|
||||||
-------------------------------------------------------------------------------
|
********************************************************************************
|
||||||
|
|
||||||
|
|
||||||
## v0.9.3 at 2021-02-02
|
## v0.9.3 at 2021-02-02
|
||||||
|
|
||||||
Acknowledgements:
|
Acknowledgments:
|
||||||
|
|
||||||
- [Mahlon E. Smith](http://www.martini.nu/) for [FreeBSD port of libmdbx](https://svnweb.freebsd.org/ports/head/databases/mdbx/).
|
- [Mahlon E. Smith](http://www.martini.nu/) for [FreeBSD port of libmdbx](https://svnweb.freebsd.org/ports/head/databases/mdbx/).
|
||||||
- [장세연](http://www.castis.com) for bug fixing and PR.
|
- [장세연](http://www.castis.com) for bug fixing and PR.
|
||||||
@ -899,7 +1271,7 @@ Removed options and features:
|
|||||||
New features:
|
New features:
|
||||||
|
|
||||||
- Package for FreeBSD is available now by Mahlon E. Smith.
|
- Package for FreeBSD is available now by Mahlon E. Smith.
|
||||||
- New API functions to get/set various options (https://web.archive.org/web/https://github.com/erthink/libmdbx/issues/128):
|
- New API functions to get/set various options (https://libmdbx.dqdkfa.ru/dead-github/issues/128):
|
||||||
- the maximum number of named databases for the environment;
|
- the maximum number of named databases for the environment;
|
||||||
- the maximum number of threads/reader slots;
|
- the maximum number of threads/reader slots;
|
||||||
- threshold (since the last unsteady commit) to force flush the data buffers to disk;
|
- threshold (since the last unsteady commit) to force flush the data buffers to disk;
|
||||||
@ -912,7 +1284,7 @@ New features:
|
|||||||
- maximal part of the dirty pages may be spilled when necessary;
|
- maximal part of the dirty pages may be spilled when necessary;
|
||||||
- minimal part of the dirty pages should be spilled when necessary;
|
- minimal part of the dirty pages should be spilled when necessary;
|
||||||
- how much of the parent transaction dirty pages will be spilled while start each child transaction;
|
- how much of the parent transaction dirty pages will be spilled while start each child transaction;
|
||||||
- Unlimited/Dynamic size of retired and dirty page lists (https://web.archive.org/web/https://github.com/erthink/libmdbx/issues/123).
|
- Unlimited/Dynamic size of retired and dirty page lists (https://libmdbx.dqdkfa.ru/dead-github/issues/123).
|
||||||
- Added `-p` option (purge subDB before loading) to `mdbx_load` tool.
|
- Added `-p` option (purge subDB before loading) to `mdbx_load` tool.
|
||||||
- Reworked spilling of large transaction and committing of nested transactions:
|
- Reworked spilling of large transaction and committing of nested transactions:
|
||||||
- page spilling code reworked to avoid the flaws and bugs inherited from LMDB;
|
- page spilling code reworked to avoid the flaws and bugs inherited from LMDB;
|
||||||
@ -922,27 +1294,30 @@ New features:
|
|||||||
- Added `MDBX_ENABLE_REFUND` and `MDBX_PNL_ASCENDING` internal/advanced build options.
|
- Added `MDBX_ENABLE_REFUND` and `MDBX_PNL_ASCENDING` internal/advanced build options.
|
||||||
- Added `mdbx_default_pagesize()` function.
|
- Added `mdbx_default_pagesize()` function.
|
||||||
- Better support architectures with a weak/relaxed memory consistency model (ARM, AARCH64, PPC, MIPS, RISC-V, etc) by means [C11 atomics](https://en.cppreference.com/w/c/atomic).
|
- Better support architectures with a weak/relaxed memory consistency model (ARM, AARCH64, PPC, MIPS, RISC-V, etc) by means [C11 atomics](https://en.cppreference.com/w/c/atomic).
|
||||||
- Speed up page number lists and dirty page lists (https://web.archive.org/web/https://github.com/erthink/libmdbx/issues/132).
|
- Speed up page number lists and dirty page lists (https://libmdbx.dqdkfa.ru/dead-github/issues/132).
|
||||||
- Added `LIBMDBX_NO_EXPORTS_LEGACY_API` build option.
|
- Added `LIBMDBX_NO_EXPORTS_LEGACY_API` build option.
|
||||||
|
|
||||||
Fixes:
|
Fixes:
|
||||||
|
|
||||||
- Fixed missing cleanup (null assigned) in the C++ commit/abort (https://web.archive.org/web/https://github.com/erthink/libmdbx/pull/143).
|
- Fixed missing cleanup (null assigned) in the C++ commit/abort (https://libmdbx.dqdkfa.ru/dead-github/pull/143).
|
||||||
- Fixed `mdbx_realloc()` for case of nullptr and `MDBX_WITHOUT_MSVC_CRT=ON` for Windows.
|
- Fixed `mdbx_realloc()` for case of nullptr and `MDBX_WITHOUT_MSVC_CRT=ON` for Windows.
|
||||||
- Fixed the possibility to use invalid and renewed (closed & re-opened, dropped & re-created) DBI-handles (https://web.archive.org/web/https://github.com/erthink/libmdbx/issues/146).
|
- Fixed the possibility to use invalid and renewed (closed & re-opened, dropped & re-created) DBI-handles (https://libmdbx.dqdkfa.ru/dead-github/issues/146).
|
||||||
- Fixed 4-byte aligned access to 64-bit integers, including access to the `bootid` meta-page's field (https://web.archive.org/web/https://github.com/erthink/libmdbx/issues/153).
|
- Fixed 4-byte aligned access to 64-bit integers, including access to the `bootid` meta-page's field (https://libmdbx.dqdkfa.ru/dead-github/issues/153).
|
||||||
- Fixed minor/potential memory leak during page flushing and unspilling.
|
- Fixed minor/potential memory leak during page flushing and unspilling.
|
||||||
- Fixed handling states of cursors's and subDBs's for nested transactions.
|
- Fixed handling states of cursors's and subDBs's for nested transactions.
|
||||||
- Fixed page leak in extra rare case the list of retired pages changed during update GC on transaction commit.
|
- Fixed page leak in extra rare case the list of retired pages changed during update GC on transaction commit.
|
||||||
- Fixed assertions to avoid false-positive UB detection by CLANG/LLVM (https://web.archive.org/web/https://github.com/erthink/libmdbx/issues/153).
|
- Fixed assertions to avoid false-positive UB detection by CLANG/LLVM (https://libmdbx.dqdkfa.ru/dead-github/issues/153).
|
||||||
- Fixed `MDBX_TXN_FULL` and regressive `MDBX_KEYEXIST` during large transaction commit with `MDBX_LIFORECLAIM` (https://web.archive.org/web/https://github.com/erthink/libmdbx/issues/123).
|
- Fixed `MDBX_TXN_FULL` and regressive `MDBX_KEYEXIST` during large transaction commit with `MDBX_LIFORECLAIM` (https://libmdbx.dqdkfa.ru/dead-github/issues/123).
|
||||||
- Fixed auto-recovery (`weak->steady` with the same boot-id) when Database size at last weak checkpoint is large than at last steady checkpoint.
|
- Fixed auto-recovery (`weak->steady` with the same boot-id) when Database size at last weak checkpoint is large than at last steady checkpoint.
|
||||||
- Fixed operation on systems with unusual small/large page size, including PowerPC (https://web.archive.org/web/https://github.com/erthink/libmdbx/issues/157).
|
- Fixed operation on systems with unusual small/large page size, including PowerPC (https://libmdbx.dqdkfa.ru/dead-github/issues/157).
|
||||||
|
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
## v0.9.2 at 2020-11-27
|
## v0.9.2 at 2020-11-27
|
||||||
|
|
||||||
Acknowledgements:
|
Acknowledgments:
|
||||||
|
|
||||||
- Jens Alfke (Mobile Architect at [Couchbase](https://www.couchbase.com/)) for [NimDBX](https://github.com/snej/nimdbx).
|
- Jens Alfke (Mobile Architect at [Couchbase](https://www.couchbase.com/)) for [NimDBX](https://github.com/snej/nimdbx).
|
||||||
- Clément Renault (CTO at [MeiliSearch](https://www.meilisearch.com/)) for [mdbx-rs](https://github.com/Kerollmops/mdbx-rs).
|
- Clément Renault (CTO at [MeiliSearch](https://www.meilisearch.com/)) for [mdbx-rs](https://github.com/Kerollmops/mdbx-rs).
|
||||||
@ -975,11 +1350,11 @@ Fixes:
|
|||||||
- Fixed copy&paste typos.
|
- Fixed copy&paste typos.
|
||||||
- Fixed minor false-positive GCC warning.
|
- Fixed minor false-positive GCC warning.
|
||||||
- Added workaround for broken `DEFINE_ENUM_FLAG_OPERATORS` from Windows SDK.
|
- Added workaround for broken `DEFINE_ENUM_FLAG_OPERATORS` from Windows SDK.
|
||||||
- Fixed cursor state after multimap/dupsort repeated deletes (https://web.archive.org/web/https://github.com/erthink/libmdbx/issues/121).
|
- Fixed cursor state after multimap/dupsort repeated deletes (https://libmdbx.dqdkfa.ru/dead-github/issues/121).
|
||||||
- Added `SIGPIPE` suppression for internal thread during `mdbx_env_copy()`.
|
- Added `SIGPIPE` suppression for internal thread during `mdbx_env_copy()`.
|
||||||
- Fixed extra-rare `MDBX_KEY_EXIST` error during `mdbx_commit()` (https://web.archive.org/web/https://github.com/erthink/libmdbx/issues/131).
|
- Fixed extra-rare `MDBX_KEY_EXIST` error during `mdbx_commit()` (https://libmdbx.dqdkfa.ru/dead-github/issues/131).
|
||||||
- Fixed spilled pages checking (https://web.archive.org/web/https://github.com/erthink/libmdbx/issues/126).
|
- Fixed spilled pages checking (https://libmdbx.dqdkfa.ru/dead-github/issues/126).
|
||||||
- Fixed `mdbx_load` for 'plain text' and without `-s name` cases (https://web.archive.org/web/https://github.com/erthink/libmdbx/issues/136).
|
- Fixed `mdbx_load` for 'plain text' and without `-s name` cases (https://libmdbx.dqdkfa.ru/dead-github/issues/136).
|
||||||
- Fixed save/restore/commit of cursors for nested transactions.
|
- Fixed save/restore/commit of cursors for nested transactions.
|
||||||
- Fixed cursors state in rare/special cases (move next beyond end-of-data, after deletion and so on).
|
- Fixed cursors state in rare/special cases (move next beyond end-of-data, after deletion and so on).
|
||||||
- Added workaround for MSVC 19.28 (Visual Studio 16.8) (but may still hang during compilation).
|
- Added workaround for MSVC 19.28 (Visual Studio 16.8) (but may still hang during compilation).
|
||||||
@ -990,6 +1365,9 @@ Fixes:
|
|||||||
- Added handling `EXCEPTION_POSSIBLE_DEADLOCK` condition for Windows.
|
- Added handling `EXCEPTION_POSSIBLE_DEADLOCK` condition for Windows.
|
||||||
|
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
## v0.9.1 2020-09-30
|
## v0.9.1 2020-09-30
|
||||||
|
|
||||||
Added features:
|
Added features:
|
||||||
@ -1032,10 +1410,13 @@ Fixes:
|
|||||||
- Fix a lot of typos & spelling (Thanks to Josh Soref for PR).
|
- Fix a lot of typos & spelling (Thanks to Josh Soref for PR).
|
||||||
- Fix `getopt()` messages for Windows (Thanks to Andrey Sporaw for reporting).
|
- Fix `getopt()` messages for Windows (Thanks to Andrey Sporaw for reporting).
|
||||||
- Fix MSVC compiler version requirements (Thanks to Andrey Sporaw for reporting).
|
- Fix MSVC compiler version requirements (Thanks to Andrey Sporaw for reporting).
|
||||||
- Workarounds for QEMU's bugs to run tests for cross-builded library under QEMU.
|
- Workarounds for QEMU's bugs to run tests for cross-built[A library under QEMU.
|
||||||
- Now C++ compiler optional for building by CMake.
|
- Now C++ compiler optional for building by CMake.
|
||||||
|
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
## v0.9.0 2020-07-31 (not a release, but API changes)
|
## v0.9.0 2020-07-31 (not a release, but API changes)
|
||||||
|
|
||||||
Added features:
|
Added features:
|
||||||
@ -1049,7 +1430,7 @@ Deprecated functions and flags:
|
|||||||
Please use the value-to-key functions to provide keys that are compatible with the built-in libmdbx comparators.
|
Please use the value-to-key functions to provide keys that are compatible with the built-in libmdbx comparators.
|
||||||
|
|
||||||
|
|
||||||
-------------------------------------------------------------------------------
|
********************************************************************************
|
||||||
|
|
||||||
|
|
||||||
## 2020-07-06
|
## 2020-07-06
|
||||||
@ -1101,7 +1482,7 @@ Deprecated functions and flags:
|
|||||||
- Avoid using `pwritev()` for single-writes (up to 10% speedup for some kernels & scenarios).
|
- Avoid using `pwritev()` for single-writes (up to 10% speedup for some kernels & scenarios).
|
||||||
- Avoiding `MDBX_UTTERLY_NOSYNC` as result of flags merge.
|
- Avoiding `MDBX_UTTERLY_NOSYNC` as result of flags merge.
|
||||||
- Add `mdbx_dbi_dupsort_depthmask()` function.
|
- Add `mdbx_dbi_dupsort_depthmask()` function.
|
||||||
- Add `MDBX_CP_FORCE_RESIZEABLE` option.
|
- Add `MDBX_CP_FORCE_RESIZABLE` option.
|
||||||
- Add deprecated `MDBX_MAP_RESIZED` for compatibility.
|
- Add deprecated `MDBX_MAP_RESIZED` for compatibility.
|
||||||
- Add `MDBX_BUILD_TOOLS` option (default `ON`).
|
- Add `MDBX_BUILD_TOOLS` option (default `ON`).
|
||||||
- Refine `mdbx_dbi_open_ex()` to safe concurrently opening the same handle from different threads.
|
- Refine `mdbx_dbi_open_ex()` to safe concurrently opening the same handle from different threads.
|
||||||
@ -1189,6 +1570,8 @@ Deprecated functions and flags:
|
|||||||
- API description.
|
- API description.
|
||||||
- Checking for non-local filesystems to avoid DB corruption.
|
- Checking for non-local filesystems to avoid DB corruption.
|
||||||
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
|
********************************************************************************
|
||||||
|
|
||||||
|
|
||||||
For early changes see the git commit history.
|
For early changes see the git commit history.
|
||||||
|
|||||||
@ -320,7 +320,7 @@ IOARENA := $(shell \
|
|||||||
(test -x ../ioarena/@BUILD/src/ioarena && echo ../ioarena/@BUILD/src/ioarena) || \
|
(test -x ../ioarena/@BUILD/src/ioarena && echo ../ioarena/@BUILD/src/ioarena) || \
|
||||||
(test -x ../../@BUILD/src/ioarena && echo ../../@BUILD/src/ioarena) || \
|
(test -x ../../@BUILD/src/ioarena && echo ../../@BUILD/src/ioarena) || \
|
||||||
(test -x ../../src/ioarena && echo ../../src/ioarena) || which ioarena 2>&- || \
|
(test -x ../../src/ioarena && echo ../../src/ioarena) || which ioarena 2>&- || \
|
||||||
(echo false && echo '$(TIP) Clone and build the https://github.com/pmwkaa/ioarena.git within a neighbouring directory for availability of benchmarking.' >&2))
|
(echo false && echo '$(TIP) Clone and build the https://abf.io/erthink/ioarena.git within a neighbouring directory for availability of benchmarking.' >&2))
|
||||||
endif
|
endif
|
||||||
NN ?= 25000000
|
NN ?= 25000000
|
||||||
BENCH_CRUD_MODE ?= nosync
|
BENCH_CRUD_MODE ?= nosync
|
||||||
@ -334,7 +334,7 @@ re-bench: bench-clean bench
|
|||||||
ifeq ($(or $(IOARENA),false),false)
|
ifeq ($(or $(IOARENA),false),false)
|
||||||
bench bench-quartet bench-triplet bench-couple:
|
bench bench-quartet bench-triplet bench-couple:
|
||||||
$(QUIET)echo 'The `ioarena` benchmark is required.' >&2 && \
|
$(QUIET)echo 'The `ioarena` benchmark is required.' >&2 && \
|
||||||
echo 'Please clone and build the https://github.com/pmwkaa/ioarena.git within a neighbouring `ioarena` directory.' >&2 && \
|
echo 'Please clone and build the https://abf.io/erthink/ioarena.git within a neighbouring `ioarena` directory.' >&2 && \
|
||||||
false
|
false
|
||||||
|
|
||||||
else
|
else
|
||||||
@ -345,15 +345,20 @@ define bench-rule
|
|||||||
bench-$(1)_$(2).txt: $(3) $(IOARENA) $(lastword $(MAKEFILE_LIST))
|
bench-$(1)_$(2).txt: $(3) $(IOARENA) $(lastword $(MAKEFILE_LIST))
|
||||||
@echo ' RUNNING ioarena for $1/$2...'
|
@echo ' RUNNING ioarena for $1/$2...'
|
||||||
$(QUIET)(export LD_LIBRARY_PATH="./:$$$${LD_LIBRARY_PATH}"; \
|
$(QUIET)(export LD_LIBRARY_PATH="./:$$$${LD_LIBRARY_PATH}"; \
|
||||||
ldd $(IOARENA) && \
|
ldd $(IOARENA) | grep -i $(1) && \
|
||||||
|
$(IOARENA) -D $(1) -B batch -m $(BENCH_CRUD_MODE) -n $(2) \
|
||||||
|
| tee $$@ | grep throughput | sed 's/throughput/batch×N/' && \
|
||||||
$(IOARENA) -D $(1) -B crud -m $(BENCH_CRUD_MODE) -n $(2) \
|
$(IOARENA) -D $(1) -B crud -m $(BENCH_CRUD_MODE) -n $(2) \
|
||||||
| tee $$@ | grep throughput && \
|
| tee -a $$@ | grep throughput | sed 's/throughput/ crud/' && \
|
||||||
$(IOARENA) -D $(1) -B iterate,get,iterate,get,iterate -m $(BENCH_CRUD_MODE) -r 4 -n $(2) \
|
$(IOARENA) -D $(1) -B iterate,get,iterate,get,iterate -m $(BENCH_CRUD_MODE) -r 4 -n $(2) \
|
||||||
| tee -a $$@ | grep throughput \
|
| tee -a $$@ | grep throughput | sed '0,/throughput/{s/throughput/iterate/};s/throughput/ get/' && \
|
||||||
) || mv -f $$@ $$@.error
|
$(IOARENA) -D $(1) -B delete -m $(BENCH_CRUD_MODE) -n $(2) \
|
||||||
|
| tee -a $$@ | grep throughput | sed 's/throughput/ delete/' && \
|
||||||
|
true) || mv -f $$@ $$@.error
|
||||||
|
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
|
||||||
$(eval $(call bench-rule,mdbx,$(NN),libmdbx.$(SO_SUFFIX)))
|
$(eval $(call bench-rule,mdbx,$(NN),libmdbx.$(SO_SUFFIX)))
|
||||||
|
|
||||||
$(eval $(call bench-rule,sophia,$(NN)))
|
$(eval $(call bench-rule,sophia,$(NN)))
|
||||||
|
|||||||
@ -81,19 +81,48 @@ Historically, _libmdbx_ is a deeply revised and extended descendant of the amazi
|
|||||||
[Lightning Memory-Mapped Database](https://en.wikipedia.org/wiki/Lightning_Memory-Mapped_Database).
|
[Lightning Memory-Mapped Database](https://en.wikipedia.org/wiki/Lightning_Memory-Mapped_Database).
|
||||||
_libmdbx_ inherits all benefits from _LMDB_, but resolves some issues and adds [a set of improvements](#improvements-beyond-lmdb).
|
_libmdbx_ inherits all benefits from _LMDB_, but resolves some issues and adds [a set of improvements](#improvements-beyond-lmdb).
|
||||||
|
|
||||||
|
### MithrilDB and Future
|
||||||
|
|
||||||
<!-- section-begin mithril -->
|
<!-- section-begin mithril -->
|
||||||
|
|
||||||
The next version is under active non-public development from scratch and will be
|
The next version is under non-public development from scratch and will be
|
||||||
released as **MithrilDB** and `libmithrildb` for libraries & packages.
|
released as **MithrilDB** and `libmithrildb` for libraries & packages.
|
||||||
Admittedly mythical [Mithril](https://en.wikipedia.org/wiki/Mithril) is
|
Admittedly mythical [Mithril](https://en.wikipedia.org/wiki/Mithril) is
|
||||||
resembling silver but being stronger and lighter than steel. Therefore
|
resembling silver but being stronger and lighter than steel. Therefore
|
||||||
_MithrilDB_ is a rightly relevant name.
|
_MithrilDB_ is a rightly relevant name.
|
||||||
|
|
||||||
> _MithrilDB_ will be radically different from _libmdbx_ by the new
|
_MithrilDB_ is radically different from _libmdbx_ by the new database
|
||||||
> database format and API based on C++17, as well as the [Apache 2.0
|
format and API based on C++20. The goal of this revolution is to provide
|
||||||
> License](https://www.apache.org/licenses/LICENSE-2.0). The goal of this
|
a clearer and robust API, add more features and new valuable properties
|
||||||
> revolution is to provide a clearer and robust API, add more features and
|
of the database. All fundamental architectural problems of libmdbx/LMDB
|
||||||
> new valuable properties of the database.
|
have been solved there, but now the active development has been
|
||||||
|
suspended for top-three reasons:
|
||||||
|
|
||||||
|
1. For now _libmdbx_ «mostly» enough for all [our products](https://www.ptsecurity.com/ww-en/products/),
|
||||||
|
and I’m busy in development of replication for scalability.
|
||||||
|
2. Waiting for fresh [Elbrus CPU](https://wiki.elbrus.ru/) of [e2k architecture](https://en.wikipedia.org/wiki/Elbrus_2000),
|
||||||
|
especially with hardware acceleration of [Streebog](https://en.wikipedia.org/wiki/Streebog) and
|
||||||
|
[Kuznyechik](https://en.wikipedia.org/wiki/Kuznyechik), which are required for Merkle tree, etc.
|
||||||
|
3. The expectation of needs and opportunities due to the wide use of NVDIMM (aka persistent memory),
|
||||||
|
modern NVMe and [Ангара](https://ru.wikipedia.org/wiki/Ангара_(интерконнект)).
|
||||||
|
|
||||||
|
However, _MithrilDB_ will not be available for countries unfriendly to
|
||||||
|
Russia (i.e. acceded the sanctions, devil adepts and/or NATO). But it is
|
||||||
|
not yet known whether such restriction will be implemented only through
|
||||||
|
a license and support, either the source code will not be open at all.
|
||||||
|
Basically we are not inclined to allow our work to contribute to the
|
||||||
|
profit that goes to weapons that kill our relatives and friends.
|
||||||
|
NO OPTIONS.
|
||||||
|
|
||||||
|
Nonetheless, I try not to make any promises regarding _MithrilDB_ until release.
|
||||||
|
|
||||||
|
Contrary to _MithrilDB_, _libmdbx_ will forever free and open source.
|
||||||
|
Moreover with high-quality support whenever possible. Tu deviens
|
||||||
|
responsable pour toujours de ce que tu as apprivois. So we will continue
|
||||||
|
to comply with the original open license and the principles of
|
||||||
|
constructive cooperation, in spite of outright Github sabotage and
|
||||||
|
sanctions. I will also try to keep (not drop) Windows support, despite
|
||||||
|
it is an unused obsolete technology for us.
|
||||||
|
|
||||||
<!-- section-end -->
|
<!-- section-end -->
|
||||||
|
|
||||||
@ -248,7 +277,7 @@ the user's point of view.
|
|||||||
> and up to 30% faster when _libmdbx_ compiled with specific build options
|
> and up to 30% faster when _libmdbx_ compiled with specific build options
|
||||||
> which downgrades several runtime checks to be match with LMDB behaviour.
|
> which downgrades several runtime checks to be match with LMDB behaviour.
|
||||||
>
|
>
|
||||||
> These and other results could be easily reproduced with [ioArena](https://github.com/pmwkaa/ioarena) just by `make bench-quartet` command,
|
> These and other results could be easily reproduced with [ioArena](https://abf.io/erthink/ioarena.git) just by `make bench-quartet` command,
|
||||||
> including comparisons with [RockDB](https://en.wikipedia.org/wiki/RocksDB)
|
> including comparisons with [RockDB](https://en.wikipedia.org/wiki/RocksDB)
|
||||||
> and [WiredTiger](https://en.wikipedia.org/wiki/WiredTiger).
|
> and [WiredTiger](https://en.wikipedia.org/wiki/WiredTiger).
|
||||||
|
|
||||||
@ -435,7 +464,7 @@ unexpected or broken down.
|
|||||||
|
|
||||||
### Testing
|
### Testing
|
||||||
The amalgamated source code does not contain any tests for or several reasons.
|
The amalgamated source code does not contain any tests for or several reasons.
|
||||||
Please read [the explanation](https://web.archive.org/web/https://github.com/erthink/libmdbx/issues/214#issuecomment-870717981) and don't ask to alter this.
|
Please read [the explanation](https://libmdbx.dqdkfa.ru/dead-github/issues/214#issuecomment-870717981) and don't ask to alter this.
|
||||||
So for testing _libmdbx_ itself you need a full source code, i.e. the clone of a git repository, there is no option.
|
So for testing _libmdbx_ itself you need a full source code, i.e. the clone of a git repository, there is no option.
|
||||||
|
|
||||||
The full source code of _libmdbx_ has a [`test` subdirectory](https://gitflic.ru/project/erthink/libmdbx/tree/master/test) with minimalistic test "framework".
|
The full source code of _libmdbx_ has a [`test` subdirectory](https://gitflic.ru/project/erthink/libmdbx/tree/master/test) with minimalistic test "framework".
|
||||||
@ -618,7 +647,7 @@ Bindings
|
|||||||
| Rust | [libmdbx-rs](https://github.com/vorot93/libmdbx-rs) | [Artem Vorotnikov](https://github.com/vorot93) |
|
| Rust | [libmdbx-rs](https://github.com/vorot93/libmdbx-rs) | [Artem Vorotnikov](https://github.com/vorot93) |
|
||||||
| Rust | [mdbx](https://crates.io/crates/mdbx) | [gcxfd](https://github.com/gcxfd) |
|
| Rust | [mdbx](https://crates.io/crates/mdbx) | [gcxfd](https://github.com/gcxfd) |
|
||||||
| Java | [mdbxjni](https://github.com/castortech/mdbxjni) | [Castor Technologies](https://castortech.com/) |
|
| Java | [mdbxjni](https://github.com/castortech/mdbxjni) | [Castor Technologies](https://castortech.com/) |
|
||||||
| Python (draft) | [python-bindings](https://web.archive.org/web/https://github.com/erthink/libmdbx/commits/python-bindings) branch | [Noel Kuntze](https://github.com/Thermi)
|
| Python (draft) | [python-bindings](https://libmdbx.dqdkfa.ru/dead-github/commits/python-bindings) branch | [Noel Kuntze](https://github.com/Thermi)
|
||||||
| .NET (obsolete) | [mdbx.NET](https://github.com/wangjia184/mdbx.NET) | [Jerry Wang](https://github.com/wangjia184) |
|
| .NET (obsolete) | [mdbx.NET](https://github.com/wangjia184/mdbx.NET) | [Jerry Wang](https://github.com/wangjia184) |
|
||||||
|
|
||||||
<!-- section-end -->
|
<!-- section-end -->
|
||||||
@ -630,7 +659,7 @@ Bindings
|
|||||||
Performance comparison
|
Performance comparison
|
||||||
======================
|
======================
|
||||||
|
|
||||||
All benchmarks were done in 2015 by [IOArena](https://github.com/pmwkaa/ioarena)
|
All benchmarks were done in 2015 by [IOArena](https://abf.io/erthink/ioarena.git)
|
||||||
and multiple [scripts](https://github.com/pmwkaa/ioarena/tree/HL%2B%2B2015)
|
and multiple [scripts](https://github.com/pmwkaa/ioarena/tree/HL%2B%2B2015)
|
||||||
runs on Lenovo Carbon-2 laptop, i7-4600U 2.1 GHz (2 physical cores, 4 HyperThreading cores), 8 Gb RAM,
|
runs on Lenovo Carbon-2 laptop, i7-4600U 2.1 GHz (2 physical cores, 4 HyperThreading cores), 8 Gb RAM,
|
||||||
SSD SAMSUNG MZNTD512HAGL-000L1 (DXT23L0Q) 512 Gb.
|
SSD SAMSUNG MZNTD512HAGL-000L1 (DXT23L0Q) 512 Gb.
|
||||||
|
|||||||
@ -1 +1 @@
|
|||||||
0.12.2.0
|
0.12.6.0
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
## Copyright (c) 2012-2022 Leonid Yuriev <leo@yuriev.ru>.
|
## Copyright (c) 2012-2023 Leonid Yuriev <leo@yuriev.ru>.
|
||||||
##
|
##
|
||||||
## Licensed under the Apache License, Version 2.0 (the "License");
|
## Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
## you may not use this file except in compliance with the License.
|
## you may not use this file except in compliance with the License.
|
||||||
@ -348,6 +348,8 @@ endif()
|
|||||||
|
|
||||||
if(MSVC)
|
if(MSVC)
|
||||||
check_compiler_flag("/WX" CC_HAS_WERROR)
|
check_compiler_flag("/WX" CC_HAS_WERROR)
|
||||||
|
check_compiler_flag("/fsanitize=address" CC_HAS_ASAN)
|
||||||
|
check_compiler_flag("/fsanitize=undefined" CC_HAS_UBSAN)
|
||||||
else()
|
else()
|
||||||
#
|
#
|
||||||
# GCC started to warn for unused result starting from 4.2, and
|
# GCC started to warn for unused result starting from 4.2, and
|
||||||
@ -839,19 +841,26 @@ macro(setup_compile_flags)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(ENABLE_ASAN)
|
if(ENABLE_ASAN)
|
||||||
add_compile_flags("C;CXX" "-fsanitize=address")
|
if(NOT MSVC)
|
||||||
|
add_compile_flags("C;CXX" "-fsanitize=address")
|
||||||
|
else()
|
||||||
|
add_compile_flags("C;CXX" "/fsanitize=address")
|
||||||
|
endif()
|
||||||
add_definitions(-DASAN_ENABLED=1)
|
add_definitions(-DASAN_ENABLED=1)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(ENABLE_UBSAN)
|
if(ENABLE_UBSAN)
|
||||||
add_compile_flags("C;CXX" "-fsanitize=undefined" "-fsanitize-undefined-trap-on-error")
|
if(NOT MSVC)
|
||||||
|
add_compile_flags("C;CXX" "-fsanitize=undefined" "-fsanitize-undefined-trap-on-error")
|
||||||
|
else()
|
||||||
|
add_compile_flags("C;CXX" "/fsanitize=undefined")
|
||||||
|
endif()
|
||||||
add_definitions(-DUBSAN_ENABLED=1)
|
add_definitions(-DUBSAN_ENABLED=1)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(ENABLE_GCOV)
|
if(ENABLE_GCOV)
|
||||||
if(NOT HAVE_GCOV)
|
if(NOT HAVE_GCOV)
|
||||||
message(FATAL_ERROR
|
message(FATAL_ERROR "ENABLE_GCOV option requested but gcov library is not found")
|
||||||
"ENABLE_GCOV option requested but gcov library is not found")
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_compile_flags("C;CXX" "-fprofile-arcs" "-ftest-coverage")
|
add_compile_flags("C;CXX" "-fprofile-arcs" "-ftest-coverage")
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
## Copyright (c) 2012-2022 Leonid Yuriev <leo@yuriev.ru>.
|
## Copyright (c) 2012-2023 Leonid Yuriev <leo@yuriev.ru>.
|
||||||
##
|
##
|
||||||
## Licensed under the Apache License, Version 2.0 (the "License");
|
## Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
## you may not use this file except in compliance with the License.
|
## you may not use this file except in compliance with the License.
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
## Copyright (c) 2012-2022 Leonid Yuriev <leo@yuriev.ru>.
|
## Copyright (c) 2012-2023 Leonid Yuriev <leo@yuriev.ru>.
|
||||||
##
|
##
|
||||||
## Licensed under the Apache License, Version 2.0 (the "License");
|
## Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
## you may not use this file except in compliance with the License.
|
## you may not use this file except in compliance with the License.
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
.\" Copyright 2015-2022 Leonid Yuriev <leo@yuriev.ru>.
|
.\" Copyright 2015-2023 Leonid Yuriev <leo@yuriev.ru>.
|
||||||
.\" Copying restrictions apply. See COPYRIGHT/LICENSE.
|
.\" Copying restrictions apply. See COPYRIGHT/LICENSE.
|
||||||
.TH MDBX_CHK 1 "2022-11-11" "MDBX 0.12.2"
|
.TH MDBX_CHK 1 "2023-04-29" "MDBX 0.12.6"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
mdbx_chk \- MDBX checking tool
|
mdbx_chk \- MDBX checking tool
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
.\" Copyright 2015-2022 Leonid Yuriev <leo@yuriev.ru>.
|
.\" Copyright 2015-2023 Leonid Yuriev <leo@yuriev.ru>.
|
||||||
.\" Copyright 2012-2015 Howard Chu, Symas Corp. All Rights Reserved.
|
|
||||||
.\" Copyright 2015,2016 Peter-Service R&D LLC <http://billing.ru/>.
|
.\" Copyright 2015,2016 Peter-Service R&D LLC <http://billing.ru/>.
|
||||||
|
.\" Copyright 2012-2015 Howard Chu, Symas Corp. All Rights Reserved.
|
||||||
.\" Copying restrictions apply. See COPYRIGHT/LICENSE.
|
.\" Copying restrictions apply. See COPYRIGHT/LICENSE.
|
||||||
.TH MDBX_COPY 1 "2022-11-11" "MDBX 0.12.2"
|
.TH MDBX_COPY 1 "2023-04-29" "MDBX 0.12.6"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
mdbx_copy \- MDBX environment copy tool
|
mdbx_copy \- MDBX environment copy tool
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
.\" Copyright 2021-2022 Leonid Yuriev <leo@yuriev.ru>.
|
.\" Copyright 2021-2023 Leonid Yuriev <leo@yuriev.ru>.
|
||||||
.\" Copyright 2014-2021 Howard Chu, Symas Corp. All Rights Reserved.
|
.\" Copyright 2014-2021 Howard Chu, Symas Corp. All Rights Reserved.
|
||||||
.\" Copying restrictions apply. See COPYRIGHT/LICENSE.
|
.\" Copying restrictions apply. See COPYRIGHT/LICENSE.
|
||||||
.TH MDBX_DROP 1 "2022-11-11" "MDBX 0.12.2"
|
.TH MDBX_DROP 1 "2023-04-29" "MDBX 0.12.6"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
mdbx_drop \- MDBX database delete tool
|
mdbx_drop \- MDBX database delete tool
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
.\" Copyright 2015-2022 Leonid Yuriev <leo@yuriev.ru>.
|
.\" Copyright 2015-2023 Leonid Yuriev <leo@yuriev.ru>.
|
||||||
.\" Copyright 2014-2015 Howard Chu, Symas Corp. All Rights Reserved.
|
|
||||||
.\" Copyright 2015,2016 Peter-Service R&D LLC <http://billing.ru/>.
|
.\" Copyright 2015,2016 Peter-Service R&D LLC <http://billing.ru/>.
|
||||||
|
.\" Copyright 2014-2015 Howard Chu, Symas Corp. All Rights Reserved.
|
||||||
.\" Copying restrictions apply. See COPYRIGHT/LICENSE.
|
.\" Copying restrictions apply. See COPYRIGHT/LICENSE.
|
||||||
.TH MDBX_DUMP 1 "2022-11-11" "MDBX 0.12.2"
|
.TH MDBX_DUMP 1 "2023-04-29" "MDBX 0.12.6"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
mdbx_dump \- MDBX environment export tool
|
mdbx_dump \- MDBX environment export tool
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
.\" Copyright 2015-2022 Leonid Yuriev <leo@yuriev.ru>.
|
.\" Copyright 2015-2023 Leonid Yuriev <leo@yuriev.ru>.
|
||||||
.\" Copyright 2014-2015 Howard Chu, Symas Corp. All Rights Reserved.
|
|
||||||
.\" Copyright 2015,2016 Peter-Service R&D LLC <http://billing.ru/>.
|
.\" Copyright 2015,2016 Peter-Service R&D LLC <http://billing.ru/>.
|
||||||
|
.\" Copyright 2014-2015 Howard Chu, Symas Corp. All Rights Reserved.
|
||||||
.\" Copying restrictions apply. See COPYRIGHT/LICENSE.
|
.\" Copying restrictions apply. See COPYRIGHT/LICENSE.
|
||||||
.TH MDBX_LOAD 1 "2022-11-11" "MDBX 0.12.2"
|
.TH MDBX_LOAD 1 "2023-04-29" "MDBX 0.12.6"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
mdbx_load \- MDBX environment import tool
|
mdbx_load \- MDBX environment import tool
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
.\" Copyright 2015-2022 Leonid Yuriev <leo@yuriev.ru>.
|
.\" Copyright 2015-2023 Leonid Yuriev <leo@yuriev.ru>.
|
||||||
.\" Copyright 2012-2015 Howard Chu, Symas Corp. All Rights Reserved.
|
|
||||||
.\" Copyright 2015,2016 Peter-Service R&D LLC <http://billing.ru/>.
|
.\" Copyright 2015,2016 Peter-Service R&D LLC <http://billing.ru/>.
|
||||||
|
.\" Copyright 2012-2015 Howard Chu, Symas Corp. All Rights Reserved.
|
||||||
.\" Copying restrictions apply. See COPYRIGHT/LICENSE.
|
.\" Copying restrictions apply. See COPYRIGHT/LICENSE.
|
||||||
.TH MDBX_STAT 1 "2022-11-11" "MDBX 0.12.2"
|
.TH MDBX_STAT 1 "2023-04-29" "MDBX 0.12.6"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
mdbx_stat \- MDBX environment status tool
|
mdbx_stat \- MDBX environment status tool
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
|
|||||||
7717
crates/storage/libmdbx-rs/mdbx-sys/libmdbx/mdbx.c
vendored
7717
crates/storage/libmdbx-rs/mdbx-sys/libmdbx/mdbx.c
vendored
File diff suppressed because it is too large
Load Diff
664
crates/storage/libmdbx-rs/mdbx-sys/libmdbx/mdbx.c++
vendored
664
crates/storage/libmdbx-rs/mdbx-sys/libmdbx/mdbx.c++
vendored
File diff suppressed because it is too large
Load Diff
178
crates/storage/libmdbx-rs/mdbx-sys/libmdbx/mdbx.h
vendored
178
crates/storage/libmdbx-rs/mdbx-sys/libmdbx/mdbx.h
vendored
@ -25,7 +25,7 @@ _The Future will (be) [Positive](https://www.ptsecurity.com). Всё будет
|
|||||||
|
|
||||||
\section copyright LICENSE & COPYRIGHT
|
\section copyright LICENSE & COPYRIGHT
|
||||||
|
|
||||||
\authors Copyright (c) 2015-2022, Leonid Yuriev <leo@yuriev.ru>
|
\authors Copyright (c) 2015-2023, Leonid Yuriev <leo@yuriev.ru>
|
||||||
and other _libmdbx_ authors: please see [AUTHORS](./AUTHORS) file.
|
and other _libmdbx_ authors: please see [AUTHORS](./AUTHORS) file.
|
||||||
|
|
||||||
\copyright Redistribution and use in source and binary forms, with or without
|
\copyright Redistribution and use in source and binary forms, with or without
|
||||||
@ -77,10 +77,10 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||||||
|
|
||||||
#if defined(__riscv) || defined(__riscv__) || defined(__RISCV) || \
|
#if defined(__riscv) || defined(__riscv__) || defined(__RISCV) || \
|
||||||
defined(__RISCV__)
|
defined(__RISCV__)
|
||||||
#warning The RISC-V architecture is intentionally insecure by design. \
|
#warning "The RISC-V architecture is intentionally insecure by design. \
|
||||||
Please delete this admonition at your own risk, \
|
Please delete this admonition at your own risk, \
|
||||||
if you make such decision informed and consciously. \
|
if you make such decision informed and consciously. \
|
||||||
Refer to https://clck.ru/32d9xH for more information.
|
Refer to https://clck.ru/32d9xH for more information."
|
||||||
#endif /* RISC-V */
|
#endif /* RISC-V */
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
@ -695,9 +695,9 @@ extern LIBMDBX_VERINFO_API const struct MDBX_build_info {
|
|||||||
* automatically (de)initialization, releasing reader lock table slots
|
* automatically (de)initialization, releasing reader lock table slots
|
||||||
* and so on.
|
* and so on.
|
||||||
*
|
*
|
||||||
* If MDBX is built as a DLL this is done out-of-the-box by DllEntry(),
|
* If MDBX built as a DLL this is done out-of-the-box by DllEntry() function,
|
||||||
* function which called automatically by Windows core with passing corresponding
|
* which called automatically by Windows core with passing corresponding reason
|
||||||
* reason argument.
|
* argument.
|
||||||
*
|
*
|
||||||
* Otherwise, if MDBX was built not as a DLL, some black magic
|
* Otherwise, if MDBX was built not as a DLL, some black magic
|
||||||
* may be required depending of Windows version:
|
* may be required depending of Windows version:
|
||||||
@ -881,7 +881,7 @@ enum MDBX_constants {
|
|||||||
/* DEBUG & LOGGING ************************************************************/
|
/* DEBUG & LOGGING ************************************************************/
|
||||||
|
|
||||||
/** \addtogroup c_debug
|
/** \addtogroup c_debug
|
||||||
* \note Most of debug feature enabled only when libmdbx is built with
|
* \note Most of debug feature enabled only when libmdbx built with
|
||||||
* \ref MDBX_DEBUG build option. @{ */
|
* \ref MDBX_DEBUG build option. @{ */
|
||||||
|
|
||||||
/** Log level
|
/** Log level
|
||||||
@ -946,7 +946,7 @@ typedef enum MDBX_log_level_t MDBX_log_level_t;
|
|||||||
*
|
*
|
||||||
* \details `MDBX_DBG_DUMP` and `MDBX_DBG_LEGACY_MULTIOPEN` always have an
|
* \details `MDBX_DBG_DUMP` and `MDBX_DBG_LEGACY_MULTIOPEN` always have an
|
||||||
* effect, but `MDBX_DBG_ASSERT`, `MDBX_DBG_AUDIT` and `MDBX_DBG_JITTER` only if
|
* effect, but `MDBX_DBG_ASSERT`, `MDBX_DBG_AUDIT` and `MDBX_DBG_JITTER` only if
|
||||||
* libmdbx is built with \ref MDBX_DEBUG. */
|
* libmdbx built with \ref MDBX_DEBUG. */
|
||||||
enum MDBX_debug_flags_t {
|
enum MDBX_debug_flags_t {
|
||||||
MDBX_DBG_NONE = 0,
|
MDBX_DBG_NONE = 0,
|
||||||
|
|
||||||
@ -1926,6 +1926,15 @@ enum MDBX_error_t {
|
|||||||
/** Overlapping read and write transactions for the current thread */
|
/** Overlapping read and write transactions for the current thread */
|
||||||
MDBX_TXN_OVERLAPPING = -30415,
|
MDBX_TXN_OVERLAPPING = -30415,
|
||||||
|
|
||||||
|
/** Внутренняя ошибка возвращаемая в случае нехватки запаса свободных страниц
|
||||||
|
* при обновлении GC. Используется как вспомогательное средство для отладки.
|
||||||
|
* \note С точки зрения пользователя семантически
|
||||||
|
* равнозначна \ref MDBX_PROBLEM. */
|
||||||
|
MDBX_BACKLOG_DEPLETED = -30414,
|
||||||
|
|
||||||
|
/** Alternative/Duplicate LCK-file is exists and should be removed manually */
|
||||||
|
MDBX_DUPLICATED_CLK = -30413,
|
||||||
|
|
||||||
/* The last of MDBX-added error codes */
|
/* The last of MDBX-added error codes */
|
||||||
MDBX_LAST_ADDED_ERRCODE = MDBX_TXN_OVERLAPPING,
|
MDBX_LAST_ADDED_ERRCODE = MDBX_TXN_OVERLAPPING,
|
||||||
|
|
||||||
@ -2051,7 +2060,9 @@ LIBMDBX_API const char *mdbx_strerror_r_ANSI2OEM(int errnum, char *buf,
|
|||||||
* \returns a non-zero error value on failure and 0 on success. */
|
* \returns a non-zero error value on failure and 0 on success. */
|
||||||
LIBMDBX_API int mdbx_env_create(MDBX_env **penv);
|
LIBMDBX_API int mdbx_env_create(MDBX_env **penv);
|
||||||
|
|
||||||
/** \brief MDBX environment options. */
|
/** \brief MDBX environment extra runtime options.
|
||||||
|
* \ingroup c_settings
|
||||||
|
* \see mdbx_env_set_option() \see mdbx_env_get_option() */
|
||||||
enum MDBX_option_t {
|
enum MDBX_option_t {
|
||||||
/** \brief Controls the maximum number of named databases for the environment.
|
/** \brief Controls the maximum number of named databases for the environment.
|
||||||
*
|
*
|
||||||
@ -2220,13 +2231,46 @@ enum MDBX_option_t {
|
|||||||
* to 50% (half empty) which corresponds to the range from 8192 and to 32768
|
* to 50% (half empty) which corresponds to the range from 8192 and to 32768
|
||||||
* in units respectively. */
|
* in units respectively. */
|
||||||
MDBX_opt_merge_threshold_16dot16_percent,
|
MDBX_opt_merge_threshold_16dot16_percent,
|
||||||
|
|
||||||
|
/** \brief Controls the choosing between use write-through disk writes and
|
||||||
|
* usual ones with followed flush by the `fdatasync()` syscall.
|
||||||
|
* \details Depending on the operating system, storage subsystem
|
||||||
|
* characteristics and the use case, higher performance can be achieved by
|
||||||
|
* either using write-through or a serie of usual/lazy writes followed by
|
||||||
|
* the flush-to-disk.
|
||||||
|
*
|
||||||
|
* Basically for N chunks the latency/cost of write-through is:
|
||||||
|
* latency = N * (emit + round-trip-to-storage + storage-execution);
|
||||||
|
* And for serie of lazy writes with flush is:
|
||||||
|
* latency = N * (emit + storage-execution) + flush + round-trip-to-storage.
|
||||||
|
*
|
||||||
|
* So, for large N and/or noteable round-trip-to-storage the write+flush
|
||||||
|
* approach is win. But for small N and/or near-zero NVMe-like latency
|
||||||
|
* the write-through is better.
|
||||||
|
*
|
||||||
|
* To solve this issue libmdbx provide `MDBX_opt_writethrough_threshold`:
|
||||||
|
* - when N described above less or equal specified threshold,
|
||||||
|
* a write-through approach will be used;
|
||||||
|
* - otherwise, when N great than specified threshold,
|
||||||
|
* a write-and-flush approach will be used.
|
||||||
|
*
|
||||||
|
* \note MDBX_opt_writethrough_threshold affects only \ref MDBX_SYNC_DURABLE
|
||||||
|
* mode without \ref MDBX_WRITEMAP, and not supported on Windows.
|
||||||
|
* On Windows a write-through is used always but \ref MDBX_NOMETASYNC could
|
||||||
|
* be used for switching to write-and-flush. */
|
||||||
|
MDBX_opt_writethrough_threshold,
|
||||||
|
|
||||||
|
/** \brief Controls prevention of page-faults of reclaimed and allocated pages
|
||||||
|
* in the \ref MDBX_WRITEMAP mode by clearing ones through file handle before
|
||||||
|
* touching. */
|
||||||
|
MDBX_opt_prefault_write_enable,
|
||||||
};
|
};
|
||||||
#ifndef __cplusplus
|
#ifndef __cplusplus
|
||||||
/** \ingroup c_settings */
|
/** \ingroup c_settings */
|
||||||
typedef enum MDBX_option_t MDBX_option_t;
|
typedef enum MDBX_option_t MDBX_option_t;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** \brief Sets the value of a runtime options for an environment.
|
/** \brief Sets the value of a extra runtime options for an environment.
|
||||||
* \ingroup c_settings
|
* \ingroup c_settings
|
||||||
*
|
*
|
||||||
* \param [in] env An environment handle returned by \ref mdbx_env_create().
|
* \param [in] env An environment handle returned by \ref mdbx_env_create().
|
||||||
@ -2239,7 +2283,7 @@ typedef enum MDBX_option_t MDBX_option_t;
|
|||||||
LIBMDBX_API int mdbx_env_set_option(MDBX_env *env, const MDBX_option_t option,
|
LIBMDBX_API int mdbx_env_set_option(MDBX_env *env, const MDBX_option_t option,
|
||||||
uint64_t value);
|
uint64_t value);
|
||||||
|
|
||||||
/** \brief Gets the value of runtime options from an environment.
|
/** \brief Gets the value of extra runtime options from an environment.
|
||||||
* \ingroup c_settings
|
* \ingroup c_settings
|
||||||
*
|
*
|
||||||
* \param [in] env An environment handle returned by \ref mdbx_env_create().
|
* \param [in] env An environment handle returned by \ref mdbx_env_create().
|
||||||
@ -2260,6 +2304,8 @@ LIBMDBX_API int mdbx_env_get_option(const MDBX_env *env,
|
|||||||
* be called later to discard the \ref MDBX_env handle and release associated
|
* be called later to discard the \ref MDBX_env handle and release associated
|
||||||
* resources.
|
* resources.
|
||||||
*
|
*
|
||||||
|
* \note On Windows the \ref mdbx_env_openW() is recommended to use.
|
||||||
|
*
|
||||||
* \param [in] env An environment handle returned
|
* \param [in] env An environment handle returned
|
||||||
* by \ref mdbx_env_create()
|
* by \ref mdbx_env_create()
|
||||||
*
|
*
|
||||||
@ -2327,8 +2373,11 @@ LIBMDBX_API int mdbx_env_get_option(const MDBX_env *env,
|
|||||||
LIBMDBX_API int mdbx_env_open(MDBX_env *env, const char *pathname,
|
LIBMDBX_API int mdbx_env_open(MDBX_env *env, const char *pathname,
|
||||||
MDBX_env_flags_t flags, mdbx_mode_t mode);
|
MDBX_env_flags_t flags, mdbx_mode_t mode);
|
||||||
|
|
||||||
#if defined(_WIN32) || defined(_WIN64)
|
#if defined(_WIN32) || defined(_WIN64) || defined(DOXYGEN)
|
||||||
LIBMDBX_API int mdbx_env_openW(MDBX_env *env, const wchar_t *pathnameW,
|
/** \copydoc mdbx_env_open()
|
||||||
|
* \note Available only on Windows.
|
||||||
|
* \see mdbx_env_open() */
|
||||||
|
LIBMDBX_API int mdbx_env_openW(MDBX_env *env, const wchar_t *pathname,
|
||||||
MDBX_env_flags_t flags, mdbx_mode_t mode);
|
MDBX_env_flags_t flags, mdbx_mode_t mode);
|
||||||
#endif /* Windows */
|
#endif /* Windows */
|
||||||
|
|
||||||
@ -2358,6 +2407,8 @@ typedef enum MDBX_env_delete_mode_t MDBX_env_delete_mode_t;
|
|||||||
/** \brief Delete the environment's files in a proper and multiprocess-safe way.
|
/** \brief Delete the environment's files in a proper and multiprocess-safe way.
|
||||||
* \ingroup c_extra
|
* \ingroup c_extra
|
||||||
*
|
*
|
||||||
|
* \note On Windows the \ref mdbx_env_deleteW() is recommended to use.
|
||||||
|
*
|
||||||
* \param [in] pathname The pathname for the database or the directory in which
|
* \param [in] pathname The pathname for the database or the directory in which
|
||||||
* the database files reside.
|
* the database files reside.
|
||||||
*
|
*
|
||||||
@ -2374,8 +2425,12 @@ typedef enum MDBX_env_delete_mode_t MDBX_env_delete_mode_t;
|
|||||||
* so no deletion was performed. */
|
* so no deletion was performed. */
|
||||||
LIBMDBX_API int mdbx_env_delete(const char *pathname,
|
LIBMDBX_API int mdbx_env_delete(const char *pathname,
|
||||||
MDBX_env_delete_mode_t mode);
|
MDBX_env_delete_mode_t mode);
|
||||||
#if defined(_WIN32) || defined(_WIN64)
|
|
||||||
LIBMDBX_API int mdbx_env_deleteW(const wchar_t *pathnameW,
|
#if defined(_WIN32) || defined(_WIN64) || defined(DOXYGEN)
|
||||||
|
/** \copydoc mdbx_env_delete()
|
||||||
|
* \note Available only on Windows.
|
||||||
|
* \see mdbx_env_delete() */
|
||||||
|
LIBMDBX_API int mdbx_env_deleteW(const wchar_t *pathname,
|
||||||
MDBX_env_delete_mode_t mode);
|
MDBX_env_delete_mode_t mode);
|
||||||
#endif /* Windows */
|
#endif /* Windows */
|
||||||
|
|
||||||
@ -2388,6 +2443,8 @@ LIBMDBX_API int mdbx_env_deleteW(const wchar_t *pathnameW,
|
|||||||
* parallel with write transactions, because it employs a read-only
|
* parallel with write transactions, because it employs a read-only
|
||||||
* transaction. See long-lived transactions under \ref restrictions section.
|
* transaction. See long-lived transactions under \ref restrictions section.
|
||||||
*
|
*
|
||||||
|
* \note On Windows the \ref mdbx_env_copyW() is recommended to use.
|
||||||
|
*
|
||||||
* \param [in] env An environment handle returned by mdbx_env_create().
|
* \param [in] env An environment handle returned by mdbx_env_create().
|
||||||
* It must have already been opened successfully.
|
* It must have already been opened successfully.
|
||||||
* \param [in] dest The pathname of a file in which the copy will reside.
|
* \param [in] dest The pathname of a file in which the copy will reside.
|
||||||
@ -2412,7 +2469,11 @@ LIBMDBX_API int mdbx_env_deleteW(const wchar_t *pathnameW,
|
|||||||
* \returns A non-zero error value on failure and 0 on success. */
|
* \returns A non-zero error value on failure and 0 on success. */
|
||||||
LIBMDBX_API int mdbx_env_copy(MDBX_env *env, const char *dest,
|
LIBMDBX_API int mdbx_env_copy(MDBX_env *env, const char *dest,
|
||||||
MDBX_copy_flags_t flags);
|
MDBX_copy_flags_t flags);
|
||||||
#if defined(_WIN32) || defined(_WIN64)
|
|
||||||
|
#if defined(_WIN32) || defined(_WIN64) || defined(DOXYGEN)
|
||||||
|
/** \copydoc mdbx_env_copy()
|
||||||
|
* \note Available only on Windows.
|
||||||
|
* \see mdbx_env_copy() */
|
||||||
LIBMDBX_API int mdbx_env_copyW(MDBX_env *env, const wchar_t *dest,
|
LIBMDBX_API int mdbx_env_copyW(MDBX_env *env, const wchar_t *dest,
|
||||||
MDBX_copy_flags_t flags);
|
MDBX_copy_flags_t flags);
|
||||||
#endif /* Windows */
|
#endif /* Windows */
|
||||||
@ -2555,16 +2616,18 @@ struct MDBX_envinfo {
|
|||||||
* first process opened the database after everyone had previously closed it).
|
* first process opened the database after everyone had previously closed it).
|
||||||
*/
|
*/
|
||||||
struct {
|
struct {
|
||||||
uint64_t newly; /**< Quantity of a new pages added */
|
uint64_t newly; /**< Quantity of a new pages added */
|
||||||
uint64_t cow; /**< Quantity of pages copied for update */
|
uint64_t cow; /**< Quantity of pages copied for update */
|
||||||
uint64_t clone; /**< Quantity of parent's dirty pages clones
|
uint64_t clone; /**< Quantity of parent's dirty pages clones
|
||||||
for nested transactions */
|
for nested transactions */
|
||||||
uint64_t split; /**< Page splits */
|
uint64_t split; /**< Page splits */
|
||||||
uint64_t merge; /**< Page merges */
|
uint64_t merge; /**< Page merges */
|
||||||
uint64_t spill; /**< Quantity of spilled dirty pages */
|
uint64_t spill; /**< Quantity of spilled dirty pages */
|
||||||
uint64_t unspill; /**< Quantity of unspilled/reloaded pages */
|
uint64_t unspill; /**< Quantity of unspilled/reloaded pages */
|
||||||
uint64_t wops; /**< Number of explicit write operations (not a pages)
|
uint64_t wops; /**< Number of explicit write operations (not a pages)
|
||||||
to a disk */
|
to a disk */
|
||||||
|
uint64_t prefault; /**< Number of prefault write operations (not a pages) */
|
||||||
|
uint64_t mincore; /**< Number of mincore() calls */
|
||||||
uint64_t
|
uint64_t
|
||||||
msync; /**< Number of explicit msync-to-disk operations (not a pages) */
|
msync; /**< Number of explicit msync-to-disk operations (not a pages) */
|
||||||
uint64_t
|
uint64_t
|
||||||
@ -2951,6 +3014,8 @@ LIBMDBX_API int mdbx_env_get_flags(const MDBX_env *env, unsigned *flags);
|
|||||||
/** \brief Return the path that was used in mdbx_env_open().
|
/** \brief Return the path that was used in mdbx_env_open().
|
||||||
* \ingroup c_statinfo
|
* \ingroup c_statinfo
|
||||||
*
|
*
|
||||||
|
* \note On Windows the \ref mdbx_env_get_pathW() is recommended to use.
|
||||||
|
*
|
||||||
* \param [in] env An environment handle returned by \ref mdbx_env_create()
|
* \param [in] env An environment handle returned by \ref mdbx_env_create()
|
||||||
* \param [out] dest Address of a string pointer to contain the path.
|
* \param [out] dest Address of a string pointer to contain the path.
|
||||||
* This is the actual string in the environment, not a
|
* This is the actual string in the environment, not a
|
||||||
@ -2959,9 +3024,12 @@ LIBMDBX_API int mdbx_env_get_flags(const MDBX_env *env, unsigned *flags);
|
|||||||
* \returns A non-zero error value on failure and 0 on success,
|
* \returns A non-zero error value on failure and 0 on success,
|
||||||
* some possible errors are:
|
* some possible errors are:
|
||||||
* \retval MDBX_EINVAL An invalid parameter was specified. */
|
* \retval MDBX_EINVAL An invalid parameter was specified. */
|
||||||
#if !(defined(_WIN32) || defined(_WIN64))
|
|
||||||
LIBMDBX_API int mdbx_env_get_path(const MDBX_env *env, const char **dest);
|
LIBMDBX_API int mdbx_env_get_path(const MDBX_env *env, const char **dest);
|
||||||
#else
|
|
||||||
|
#if defined(_WIN32) || defined(_WIN64) || defined(DOXYGEN)
|
||||||
|
/** \copydoc mdbx_env_get_path()
|
||||||
|
* \note Available only on Windows.
|
||||||
|
* \see mdbx_env_get_path() */
|
||||||
LIBMDBX_API int mdbx_env_get_pathW(const MDBX_env *env, const wchar_t **dest);
|
LIBMDBX_API int mdbx_env_get_pathW(const MDBX_env *env, const wchar_t **dest);
|
||||||
#endif /* Windows */
|
#endif /* Windows */
|
||||||
|
|
||||||
@ -2989,6 +3057,8 @@ LIBMDBX_API int mdbx_env_get_fd(const MDBX_env *env, mdbx_filehandle_t *fd);
|
|||||||
* it is reasonable to know some details in order to make optimal decisions
|
* it is reasonable to know some details in order to make optimal decisions
|
||||||
* when choosing parameters.
|
* when choosing parameters.
|
||||||
*
|
*
|
||||||
|
* \see mdbx_env_info_ex()
|
||||||
|
*
|
||||||
* Both \ref mdbx_env_set_geometry() and legacy \ref mdbx_env_set_mapsize() are
|
* Both \ref mdbx_env_set_geometry() and legacy \ref mdbx_env_set_mapsize() are
|
||||||
* inapplicable to read-only opened environment.
|
* inapplicable to read-only opened environment.
|
||||||
*
|
*
|
||||||
@ -3098,7 +3168,7 @@ LIBMDBX_API int mdbx_env_get_fd(const MDBX_env *env, mdbx_filehandle_t *fd);
|
|||||||
* \note Actual values may be different than your have specified because of
|
* \note Actual values may be different than your have specified because of
|
||||||
* rounding to specified database page size, the system page size and/or the
|
* rounding to specified database page size, the system page size and/or the
|
||||||
* size of the system virtual memory management unit. You can get actual values
|
* size of the system virtual memory management unit. You can get actual values
|
||||||
* by \ref mdbx_env_sync_ex() or see by using the tool `mdbx_chk` with the `-v`
|
* by \ref mdbx_env_info_ex() or see by using the tool `mdbx_chk` with the `-v`
|
||||||
* option.
|
* option.
|
||||||
*
|
*
|
||||||
* Legacy \ref mdbx_env_set_mapsize() correspond to calling
|
* Legacy \ref mdbx_env_set_mapsize() correspond to calling
|
||||||
@ -3766,13 +3836,10 @@ struct MDBX_commit_latency {
|
|||||||
/** \brief Время "по настенным часам" затраченное на чтение и поиск внутри
|
/** \brief Время "по настенным часам" затраченное на чтение и поиск внутри
|
||||||
* GC ради данных пользователя. */
|
* GC ради данных пользователя. */
|
||||||
uint32_t work_rtime_monotonic;
|
uint32_t work_rtime_monotonic;
|
||||||
/** \brief Монотонное время по "настенным часам" затраченное
|
/** \brief Время ЦПУ в режиме пользователе затраченное
|
||||||
* на подготовку страниц извлекаемых из GC для данных пользователя,
|
* на подготовку страниц извлекаемых из GC для данных пользователя,
|
||||||
* включая подкачку с диска. */
|
* включая подкачку с диска. */
|
||||||
uint32_t work_xtime_monotonic;
|
uint32_t work_xtime_cpu;
|
||||||
/** \brief Время ЦПУ в режиме пользователе затраченное на чтение и поиск
|
|
||||||
* внтури GC ради данных пользователя. */
|
|
||||||
uint32_t work_rtime_cpu;
|
|
||||||
/** \brief Количество итераций поиска внутри GC при выделении страниц
|
/** \brief Количество итераций поиска внутри GC при выделении страниц
|
||||||
* ради данных пользователя. */
|
* ради данных пользователя. */
|
||||||
uint32_t work_rsteps;
|
uint32_t work_rsteps;
|
||||||
@ -3789,13 +3856,10 @@ struct MDBX_commit_latency {
|
|||||||
/** \brief Время "по настенным часам" затраченное на чтение и поиск внутри
|
/** \brief Время "по настенным часам" затраченное на чтение и поиск внутри
|
||||||
* GC для целей поддержки и обновления самой GC. */
|
* GC для целей поддержки и обновления самой GC. */
|
||||||
uint32_t self_rtime_monotonic;
|
uint32_t self_rtime_monotonic;
|
||||||
/** \brief Монотонное время по "настенным часам" затраченное на подготовку
|
/** \brief Время ЦПУ в режиме пользователе затраченное на подготовку
|
||||||
* страниц извлекаемых из GC для целей поддержки и обновления самой GC,
|
* страниц извлекаемых из GC для целей поддержки и обновления самой GC,
|
||||||
* включая подкачку с диска. */
|
* включая подкачку с диска. */
|
||||||
uint32_t self_xtime_monotonic;
|
uint32_t self_xtime_cpu;
|
||||||
/** \brief Время ЦПУ в режиме пользователе затраченное на чтение и поиск
|
|
||||||
* внтури GC для целей поддержки и обновления самой GC. */
|
|
||||||
uint32_t self_rtime_cpu;
|
|
||||||
/** \brief Количество итераций поиска внутри GC при выделении страниц
|
/** \brief Количество итераций поиска внутри GC при выделении страниц
|
||||||
* для целей поддержки и обновления самой GC. */
|
* для целей поддержки и обновления самой GC. */
|
||||||
uint32_t self_rsteps;
|
uint32_t self_rsteps;
|
||||||
@ -4128,6 +4192,8 @@ typedef int(MDBX_cmp_func)(const MDBX_val *a,
|
|||||||
* by current thread. */
|
* by current thread. */
|
||||||
LIBMDBX_API int mdbx_dbi_open(MDBX_txn *txn, const char *name,
|
LIBMDBX_API int mdbx_dbi_open(MDBX_txn *txn, const char *name,
|
||||||
MDBX_db_flags_t flags, MDBX_dbi *dbi);
|
MDBX_db_flags_t flags, MDBX_dbi *dbi);
|
||||||
|
LIBMDBX_API int mdbx_dbi_open2(MDBX_txn *txn, const MDBX_val *name,
|
||||||
|
MDBX_db_flags_t flags, MDBX_dbi *dbi);
|
||||||
|
|
||||||
/** \deprecated Please
|
/** \deprecated Please
|
||||||
* \ref avoid_custom_comparators "avoid using custom comparators" and use
|
* \ref avoid_custom_comparators "avoid using custom comparators" and use
|
||||||
@ -4147,6 +4213,9 @@ LIBMDBX_API int mdbx_dbi_open(MDBX_txn *txn, const char *name,
|
|||||||
MDBX_DEPRECATED LIBMDBX_API int
|
MDBX_DEPRECATED LIBMDBX_API int
|
||||||
mdbx_dbi_open_ex(MDBX_txn *txn, const char *name, MDBX_db_flags_t flags,
|
mdbx_dbi_open_ex(MDBX_txn *txn, const char *name, MDBX_db_flags_t flags,
|
||||||
MDBX_dbi *dbi, MDBX_cmp_func *keycmp, MDBX_cmp_func *datacmp);
|
MDBX_dbi *dbi, MDBX_cmp_func *keycmp, MDBX_cmp_func *datacmp);
|
||||||
|
MDBX_DEPRECATED LIBMDBX_API int
|
||||||
|
mdbx_dbi_open_ex2(MDBX_txn *txn, const MDBX_val *name, MDBX_db_flags_t flags,
|
||||||
|
MDBX_dbi *dbi, MDBX_cmp_func *keycmp, MDBX_cmp_func *datacmp);
|
||||||
|
|
||||||
/** \defgroup value2key Value-to-Key functions
|
/** \defgroup value2key Value-to-Key functions
|
||||||
* \brief Value-to-Key functions to
|
* \brief Value-to-Key functions to
|
||||||
@ -5444,18 +5513,20 @@ typedef enum MDBX_page_type_t MDBX_page_type_t;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** \brief Pseudo-name for MainDB */
|
/** \brief Pseudo-name for MainDB */
|
||||||
#define MDBX_PGWALK_MAIN ((const char *)((ptrdiff_t)0))
|
#define MDBX_PGWALK_MAIN ((void *)((ptrdiff_t)0))
|
||||||
/** \brief Pseudo-name for GarbageCollectorDB */
|
/** \brief Pseudo-name for GarbageCollectorDB */
|
||||||
#define MDBX_PGWALK_GC ((const char *)((ptrdiff_t)-1))
|
#define MDBX_PGWALK_GC ((void *)((ptrdiff_t)-1))
|
||||||
/** \brief Pseudo-name for MetaPages */
|
/** \brief Pseudo-name for MetaPages */
|
||||||
#define MDBX_PGWALK_META ((const char *)((ptrdiff_t)-2))
|
#define MDBX_PGWALK_META ((void *)((ptrdiff_t)-2))
|
||||||
|
|
||||||
/** \brief Callback function for traverse the b-tree. \see mdbx_env_pgwalk() */
|
/** \brief Callback function for traverse the b-tree. \see mdbx_env_pgwalk() */
|
||||||
typedef int MDBX_pgvisitor_func(
|
typedef int
|
||||||
const uint64_t pgno, const unsigned number, void *const ctx, const int deep,
|
MDBX_pgvisitor_func(const uint64_t pgno, const unsigned number, void *const ctx,
|
||||||
const char *const dbi, const size_t page_size, const MDBX_page_type_t type,
|
const int deep, const MDBX_val *dbi_name,
|
||||||
const MDBX_error_t err, const size_t nentries, const size_t payload_bytes,
|
const size_t page_size, const MDBX_page_type_t type,
|
||||||
const size_t header_bytes, const size_t unused_bytes) MDBX_CXX17_NOEXCEPT;
|
const MDBX_error_t err, const size_t nentries,
|
||||||
|
const size_t payload_bytes, const size_t header_bytes,
|
||||||
|
const size_t unused_bytes) MDBX_CXX17_NOEXCEPT;
|
||||||
|
|
||||||
/** \brief B-tree traversal function. */
|
/** \brief B-tree traversal function. */
|
||||||
LIBMDBX_API int mdbx_env_pgwalk(MDBX_txn *txn, MDBX_pgvisitor_func *visitor,
|
LIBMDBX_API int mdbx_env_pgwalk(MDBX_txn *txn, MDBX_pgvisitor_func *visitor,
|
||||||
@ -5466,13 +5537,20 @@ LIBMDBX_API int mdbx_env_pgwalk(MDBX_txn *txn, MDBX_pgvisitor_func *visitor,
|
|||||||
*
|
*
|
||||||
* This function mostly of internal API for `mdbx_chk` utility and subject to
|
* This function mostly of internal API for `mdbx_chk` utility and subject to
|
||||||
* change at any time. Do not use this function to avoid shooting your own
|
* change at any time. Do not use this function to avoid shooting your own
|
||||||
* leg(s). */
|
* leg(s).
|
||||||
|
*
|
||||||
|
* \note On Windows the \ref mdbx_env_open_for_recoveryW() is recommended
|
||||||
|
* to use. */
|
||||||
LIBMDBX_API int mdbx_env_open_for_recovery(MDBX_env *env, const char *pathname,
|
LIBMDBX_API int mdbx_env_open_for_recovery(MDBX_env *env, const char *pathname,
|
||||||
unsigned target_meta,
|
unsigned target_meta,
|
||||||
bool writeable);
|
bool writeable);
|
||||||
#if defined(_WIN32) || defined(_WIN64)
|
|
||||||
|
#if defined(_WIN32) || defined(_WIN64) || defined(DOXYGEN)
|
||||||
|
/** \copydoc mdbx_env_open_for_recovery()
|
||||||
|
* \note Available only on Windows.
|
||||||
|
* \see mdbx_env_open_for_recovery() */
|
||||||
LIBMDBX_API int mdbx_env_open_for_recoveryW(MDBX_env *env,
|
LIBMDBX_API int mdbx_env_open_for_recoveryW(MDBX_env *env,
|
||||||
const wchar_t *pathnameW,
|
const wchar_t *pathname,
|
||||||
unsigned target_meta,
|
unsigned target_meta,
|
||||||
bool writeable);
|
bool writeable);
|
||||||
#endif /* Windows */
|
#endif /* Windows */
|
||||||
|
|||||||
289
crates/storage/libmdbx-rs/mdbx-sys/libmdbx/mdbx.h++
vendored
289
crates/storage/libmdbx-rs/mdbx-sys/libmdbx/mdbx.h++
vendored
@ -1,7 +1,7 @@
|
|||||||
/// \file mdbx.h++
|
/// \file mdbx.h++
|
||||||
/// \brief The libmdbx C++ API header file.
|
/// \brief The libmdbx C++ API header file.
|
||||||
///
|
///
|
||||||
/// \author Copyright (c) 2020-2022, Leonid Yuriev <leo@yuriev.ru>.
|
/// \author Copyright (c) 2020-2023, Leonid Yuriev <leo@yuriev.ru>.
|
||||||
/// \copyright SPDX-License-Identifier: Apache-2.0
|
/// \copyright SPDX-License-Identifier: Apache-2.0
|
||||||
///
|
///
|
||||||
/// Tested with:
|
/// Tested with:
|
||||||
@ -84,6 +84,11 @@
|
|||||||
#include <experimental/filesystem>
|
#include <experimental/filesystem>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if __cplusplus >= 201103L
|
||||||
|
#include <chrono>
|
||||||
|
#include <ratio>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "mdbx.h"
|
#include "mdbx.h"
|
||||||
|
|
||||||
#if (defined(__cpp_lib_bit_cast) && __cpp_lib_bit_cast >= 201806L) || \
|
#if (defined(__cpp_lib_bit_cast) && __cpp_lib_bit_cast >= 201806L) || \
|
||||||
@ -223,17 +228,18 @@
|
|||||||
#endif /* MDBX_CXX20_UNLIKELY */
|
#endif /* MDBX_CXX20_UNLIKELY */
|
||||||
|
|
||||||
#ifndef MDBX_HAVE_CXX20_CONCEPTS
|
#ifndef MDBX_HAVE_CXX20_CONCEPTS
|
||||||
#if defined(DOXYGEN) || \
|
#if defined(__cpp_lib_concepts) && __cpp_lib_concepts >= 202002L
|
||||||
(defined(__cpp_lib_concepts) && __cpp_lib_concepts >= 202002L)
|
|
||||||
#include <concepts>
|
#include <concepts>
|
||||||
#define MDBX_HAVE_CXX20_CONCEPTS 1
|
#define MDBX_HAVE_CXX20_CONCEPTS 1
|
||||||
|
#elif defined(DOXYGEN)
|
||||||
|
#define MDBX_HAVE_CXX20_CONCEPTS 1
|
||||||
#else
|
#else
|
||||||
#define MDBX_HAVE_CXX20_CONCEPTS 0
|
#define MDBX_HAVE_CXX20_CONCEPTS 0
|
||||||
#endif /* <concepts> */
|
#endif /* <concepts> */
|
||||||
#endif /* MDBX_HAVE_CXX20_CONCEPTS */
|
#endif /* MDBX_HAVE_CXX20_CONCEPTS */
|
||||||
|
|
||||||
#ifndef MDBX_CXX20_CONCEPT
|
#ifndef MDBX_CXX20_CONCEPT
|
||||||
#if MDBX_HAVE_CXX20_CONCEPTS
|
#if MDBX_HAVE_CXX20_CONCEPTS || defined(DOXYGEN)
|
||||||
#define MDBX_CXX20_CONCEPT(CONCEPT, NAME) CONCEPT NAME
|
#define MDBX_CXX20_CONCEPT(CONCEPT, NAME) CONCEPT NAME
|
||||||
#else
|
#else
|
||||||
#define MDBX_CXX20_CONCEPT(CONCEPT, NAME) typename NAME
|
#define MDBX_CXX20_CONCEPT(CONCEPT, NAME) typename NAME
|
||||||
@ -241,7 +247,7 @@
|
|||||||
#endif /* MDBX_CXX20_CONCEPT */
|
#endif /* MDBX_CXX20_CONCEPT */
|
||||||
|
|
||||||
#ifndef MDBX_ASSERT_CXX20_CONCEPT_SATISFIED
|
#ifndef MDBX_ASSERT_CXX20_CONCEPT_SATISFIED
|
||||||
#if MDBX_HAVE_CXX20_CONCEPTS
|
#if MDBX_HAVE_CXX20_CONCEPTS || defined(DOXYGEN)
|
||||||
#define MDBX_ASSERT_CXX20_CONCEPT_SATISFIED(CONCEPT, TYPE) \
|
#define MDBX_ASSERT_CXX20_CONCEPT_SATISFIED(CONCEPT, TYPE) \
|
||||||
static_assert(CONCEPT<TYPE>)
|
static_assert(CONCEPT<TYPE>)
|
||||||
#else
|
#else
|
||||||
@ -287,7 +293,7 @@ namespace mdbx {
|
|||||||
// To enable all kinds of an compiler optimizations we use a byte-like type
|
// To enable all kinds of an compiler optimizations we use a byte-like type
|
||||||
// that don't presumes aliases for pointers as does the `char` type and its
|
// that don't presumes aliases for pointers as does the `char` type and its
|
||||||
// derivatives/typedefs.
|
// derivatives/typedefs.
|
||||||
// Please see https://web.archive.org/web/https://github.com/erthink/libmdbx/issues/263
|
// Please see https://libmdbx.dqdkfa.ru/dead-github/issues/263
|
||||||
// for reasoning of the use of `char8_t` type and switching to `__restrict__`.
|
// for reasoning of the use of `char8_t` type and switching to `__restrict__`.
|
||||||
using byte = char8_t;
|
using byte = char8_t;
|
||||||
#else
|
#else
|
||||||
@ -350,6 +356,9 @@ class cursor_managed;
|
|||||||
__cpp_lib_memory_resource >= 201603L && _GLIBCXX_USE_CXX11_ABI)
|
__cpp_lib_memory_resource >= 201603L && _GLIBCXX_USE_CXX11_ABI)
|
||||||
/// \brief Default polymorphic allocator for modern code.
|
/// \brief Default polymorphic allocator for modern code.
|
||||||
using polymorphic_allocator = ::std::pmr::string::allocator_type;
|
using polymorphic_allocator = ::std::pmr::string::allocator_type;
|
||||||
|
using default_allocator = polymorphic_allocator;
|
||||||
|
#else
|
||||||
|
using default_allocator = legacy_allocator;
|
||||||
#endif /* __cpp_lib_memory_resource >= 201603L */
|
#endif /* __cpp_lib_memory_resource >= 201603L */
|
||||||
|
|
||||||
/// \brief Default singe-byte string.
|
/// \brief Default singe-byte string.
|
||||||
@ -385,6 +394,11 @@ using path = ::std::wstring;
|
|||||||
using path = ::std::string;
|
using path = ::std::string;
|
||||||
#endif /* mdbx::path */
|
#endif /* mdbx::path */
|
||||||
|
|
||||||
|
#if __cplusplus >= 201103L || defined(DOXYGEN)
|
||||||
|
/// \brief Duration in 1/65536 units of second.
|
||||||
|
using duration = ::std::chrono::duration<unsigned, ::std::ratio<1, 65536>>;
|
||||||
|
#endif /* Duration for C++11 */
|
||||||
|
|
||||||
/// \defgroup cxx_exceptions exceptions and errors
|
/// \defgroup cxx_exceptions exceptions and errors
|
||||||
/// @{
|
/// @{
|
||||||
|
|
||||||
@ -551,8 +565,11 @@ static MDBX_CXX14_CONSTEXPR size_t check_length(size_t headroom, size_t payload,
|
|||||||
/// \defgroup cxx_data slices and buffers
|
/// \defgroup cxx_data slices and buffers
|
||||||
/// @{
|
/// @{
|
||||||
|
|
||||||
#if MDBX_HAVE_CXX20_CONCEPTS
|
#if MDBX_HAVE_CXX20_CONCEPTS || defined(DOXYGEN)
|
||||||
|
|
||||||
|
/** \concept MutableByteProducer
|
||||||
|
* \interface MutableByteProducer
|
||||||
|
* \brief MutableByteProducer C++20 concept */
|
||||||
template <typename T>
|
template <typename T>
|
||||||
concept MutableByteProducer = requires(T a, char array[42]) {
|
concept MutableByteProducer = requires(T a, char array[42]) {
|
||||||
{ a.is_empty() } -> std::same_as<bool>;
|
{ a.is_empty() } -> std::same_as<bool>;
|
||||||
@ -560,6 +577,9 @@ concept MutableByteProducer = requires(T a, char array[42]) {
|
|||||||
{ a.write_bytes(&array[0], size_t(42)) } -> std::same_as<char *>;
|
{ a.write_bytes(&array[0], size_t(42)) } -> std::same_as<char *>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/** \concept ImmutableByteProducer
|
||||||
|
* \interface ImmutableByteProducer
|
||||||
|
* \brief ImmutableByteProducer C++20 concept */
|
||||||
template <typename T>
|
template <typename T>
|
||||||
concept ImmutableByteProducer = requires(const T &a, char array[42]) {
|
concept ImmutableByteProducer = requires(const T &a, char array[42]) {
|
||||||
{ a.is_empty() } -> std::same_as<bool>;
|
{ a.is_empty() } -> std::same_as<bool>;
|
||||||
@ -567,12 +587,15 @@ concept ImmutableByteProducer = requires(const T &a, char array[42]) {
|
|||||||
{ a.write_bytes(&array[0], size_t(42)) } -> std::same_as<char *>;
|
{ a.write_bytes(&array[0], size_t(42)) } -> std::same_as<char *>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/** \concept SliceTranscoder
|
||||||
|
* \interface SliceTranscoder
|
||||||
|
* \brief SliceTranscoder C++20 concept */
|
||||||
template <typename T>
|
template <typename T>
|
||||||
concept SliceTranscoder = ImmutableByteProducer<T> &&
|
concept SliceTranscoder =
|
||||||
requires(const slice &source, const T &a) {
|
ImmutableByteProducer<T> && requires(const slice &source, const T &a) {
|
||||||
T(source);
|
T(source);
|
||||||
{ a.is_erroneous() } -> std::same_as<bool>;
|
{ a.is_erroneous() } -> std::same_as<bool>;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* MDBX_HAVE_CXX20_CONCEPTS */
|
#endif /* MDBX_HAVE_CXX20_CONCEPTS */
|
||||||
|
|
||||||
@ -2639,45 +2662,69 @@ public:
|
|||||||
return buffer(src, make_reference);
|
return buffer(src, make_reference);
|
||||||
}
|
}
|
||||||
|
|
||||||
static buffer key_from(const silo &&src) noexcept {
|
static buffer key_from(silo &&src) noexcept {
|
||||||
return buffer(::std::move(src));
|
return buffer(::std::move(src));
|
||||||
}
|
}
|
||||||
|
|
||||||
static buffer key_from(const double ieee754_64bit) {
|
static buffer key_from_double(const double ieee754_64bit) {
|
||||||
return wrap(::mdbx_key_from_double(ieee754_64bit));
|
return wrap(::mdbx_key_from_double(ieee754_64bit));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static buffer key_from(const double ieee754_64bit) {
|
||||||
|
return key_from_double(ieee754_64bit);
|
||||||
|
}
|
||||||
|
|
||||||
static buffer key_from(const double *ieee754_64bit) {
|
static buffer key_from(const double *ieee754_64bit) {
|
||||||
return wrap(::mdbx_key_from_ptrdouble(ieee754_64bit));
|
return wrap(::mdbx_key_from_ptrdouble(ieee754_64bit));
|
||||||
}
|
}
|
||||||
|
|
||||||
static buffer key_from(const uint64_t unsigned_int64) {
|
static buffer key_from_u64(const uint64_t unsigned_int64) {
|
||||||
return wrap(unsigned_int64);
|
return wrap(unsigned_int64);
|
||||||
}
|
}
|
||||||
|
|
||||||
static buffer key_from(const int64_t signed_int64) {
|
static buffer key_from(const uint64_t unsigned_int64) {
|
||||||
|
return key_from_u64(unsigned_int64);
|
||||||
|
}
|
||||||
|
|
||||||
|
static buffer key_from_i64(const int64_t signed_int64) {
|
||||||
return wrap(::mdbx_key_from_int64(signed_int64));
|
return wrap(::mdbx_key_from_int64(signed_int64));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static buffer key_from(const int64_t signed_int64) {
|
||||||
|
return key_from_i64(signed_int64);
|
||||||
|
}
|
||||||
|
|
||||||
static buffer key_from_jsonInteger(const int64_t json_integer) {
|
static buffer key_from_jsonInteger(const int64_t json_integer) {
|
||||||
return wrap(::mdbx_key_from_jsonInteger(json_integer));
|
return wrap(::mdbx_key_from_jsonInteger(json_integer));
|
||||||
}
|
}
|
||||||
|
|
||||||
static buffer key_from(const float ieee754_32bit) {
|
static buffer key_from_float(const float ieee754_32bit) {
|
||||||
return wrap(::mdbx_key_from_float(ieee754_32bit));
|
return wrap(::mdbx_key_from_float(ieee754_32bit));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static buffer key_from(const float ieee754_32bit) {
|
||||||
|
return key_from_float(ieee754_32bit);
|
||||||
|
}
|
||||||
|
|
||||||
static buffer key_from(const float *ieee754_32bit) {
|
static buffer key_from(const float *ieee754_32bit) {
|
||||||
return wrap(::mdbx_key_from_ptrfloat(ieee754_32bit));
|
return wrap(::mdbx_key_from_ptrfloat(ieee754_32bit));
|
||||||
}
|
}
|
||||||
|
|
||||||
static buffer key_from(const uint32_t unsigned_int32) {
|
static buffer key_from_u32(const uint32_t unsigned_int32) {
|
||||||
return wrap(unsigned_int32);
|
return wrap(unsigned_int32);
|
||||||
}
|
}
|
||||||
|
|
||||||
static buffer key_from(const int32_t signed_int32) {
|
static buffer key_from(const uint32_t unsigned_int32) {
|
||||||
|
return key_from_u32(unsigned_int32);
|
||||||
|
}
|
||||||
|
|
||||||
|
static buffer key_from_i32(const int32_t signed_int32) {
|
||||||
return wrap(::mdbx_key_from_int32(signed_int32));
|
return wrap(::mdbx_key_from_int32(signed_int32));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static buffer key_from(const int32_t signed_int32) {
|
||||||
|
return key_from_i32(signed_int32);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
template <class ALLOCATOR, class CAPACITY_POLICY,
|
template <class ALLOCATOR, class CAPACITY_POLICY,
|
||||||
@ -3106,10 +3153,12 @@ public:
|
|||||||
operate_parameters(const operate_parameters &) noexcept = default;
|
operate_parameters(const operate_parameters &) noexcept = default;
|
||||||
MDBX_CXX14_CONSTEXPR operate_parameters &
|
MDBX_CXX14_CONSTEXPR operate_parameters &
|
||||||
operator=(const operate_parameters &) noexcept = default;
|
operator=(const operate_parameters &) noexcept = default;
|
||||||
MDBX_env_flags_t
|
MDBX_env_flags_t make_flags(
|
||||||
make_flags(bool accede = true, ///< \copydoc MDBX_ACCEDE
|
bool accede = true, ///< Allows accepting incompatible operating options
|
||||||
bool use_subdirectory =
|
///< in case the database is already being used by
|
||||||
false ///< use subdirectory to place the DB files
|
///< another process(es) \see MDBX_ACCEDE
|
||||||
|
bool use_subdirectory =
|
||||||
|
false ///< use subdirectory to place the DB files
|
||||||
) const;
|
) const;
|
||||||
static env::mode mode_from_flags(MDBX_env_flags_t) noexcept;
|
static env::mode mode_from_flags(MDBX_env_flags_t) noexcept;
|
||||||
static env::durability durability_from_flags(MDBX_env_flags_t) noexcept;
|
static env::durability durability_from_flags(MDBX_env_flags_t) noexcept;
|
||||||
@ -3334,9 +3383,11 @@ public:
|
|||||||
|
|
||||||
/// \brief Returns the maximum number of threads/reader slots for the
|
/// \brief Returns the maximum number of threads/reader slots for the
|
||||||
/// environment.
|
/// environment.
|
||||||
|
/// \see extra_runtime_option::max_readers
|
||||||
inline unsigned max_readers() const;
|
inline unsigned max_readers() const;
|
||||||
|
|
||||||
/// \brief Returns the maximum number of named databases for the environment.
|
/// \brief Returns the maximum number of named databases for the environment.
|
||||||
|
/// \see extra_runtime_option::max_maps
|
||||||
inline unsigned max_maps() const;
|
inline unsigned max_maps() const;
|
||||||
|
|
||||||
/// \brief Returns the application context associated with the environment.
|
/// \brief Returns the application context associated with the environment.
|
||||||
@ -3348,59 +3399,117 @@ public:
|
|||||||
/// \brief Sets threshold to force flush the data buffers to disk, for
|
/// \brief Sets threshold to force flush the data buffers to disk, for
|
||||||
/// non-sync durability modes.
|
/// non-sync durability modes.
|
||||||
///
|
///
|
||||||
/// The threshold value affects all processes which operates with given
|
/// \details The threshold value affects all processes which operates with
|
||||||
/// environment until the last process close environment or a new value will
|
/// given environment until the last process close environment or a new value
|
||||||
/// be settled.
|
/// will be settled. Data is always written to disk when \ref
|
||||||
/// Data is always written to disk when \ref txn_managed::commit() is called,
|
/// txn_managed::commit() is called, but the operating system may keep it
|
||||||
/// but the operating system may keep it buffered. MDBX always flushes the OS
|
/// buffered. MDBX always flushes the OS buffers upon commit as well, unless
|
||||||
/// buffers upon commit as well, unless the environment was opened with \ref
|
/// the environment was opened with \ref whole_fragile, \ref lazy_weak_tail or
|
||||||
/// whole_fragile, \ref lazy_weak_tail or in part \ref
|
/// in part \ref half_synchronous_weak_last.
|
||||||
/// half_synchronous_weak_last. The default is 0, than mean no any threshold
|
|
||||||
/// checked, and no additional flush will be made.
|
|
||||||
///
|
///
|
||||||
|
/// The default is 0, than mean no any threshold checked, and no additional
|
||||||
|
/// flush will be made.
|
||||||
|
/// \see extra_runtime_option::sync_bytes
|
||||||
inline env &set_sync_threshold(size_t bytes);
|
inline env &set_sync_threshold(size_t bytes);
|
||||||
|
|
||||||
|
/// \brief Gets threshold used to force flush the data buffers to disk, for
|
||||||
|
/// non-sync durability modes.
|
||||||
|
///
|
||||||
|
/// \copydetails set_sync_threshold()
|
||||||
|
/// \see extra_runtime_option::sync_bytes
|
||||||
|
inline size_t sync_threshold() const;
|
||||||
|
|
||||||
|
#if __cplusplus >= 201103L || defined(DOXYGEN)
|
||||||
/// \brief Sets relative period since the last unsteady commit to force flush
|
/// \brief Sets relative period since the last unsteady commit to force flush
|
||||||
/// the data buffers to disk, for non-sync durability modes.
|
/// the data buffers to disk, for non-sync durability modes.
|
||||||
///
|
///
|
||||||
/// The relative period value affects all processes which operates with given
|
/// \details The relative period value affects all processes which operates
|
||||||
/// environment until the last process close environment or a new value will
|
/// with given environment until the last process close environment or a new
|
||||||
/// be settled.
|
/// value will be settled. Data is always written to disk when \ref
|
||||||
/// Data is always written to disk when \ref txn_managed::commit() is called,
|
/// txn_managed::commit() is called, but the operating system may keep it
|
||||||
/// but the operating system may keep it buffered. MDBX always flushes the OS
|
/// buffered. MDBX always flushes the OS buffers upon commit as well, unless
|
||||||
/// buffers upon commit as well, unless the environment was opened with \ref
|
/// the environment was opened with \ref whole_fragile, \ref lazy_weak_tail or
|
||||||
/// whole_fragile, \ref lazy_weak_tail or in part \ref
|
/// in part \ref half_synchronous_weak_last. Settled period don't checked
|
||||||
/// half_synchronous_weak_last. Settled period don't checked asynchronously,
|
/// asynchronously, but only by the \ref txn_managed::commit() and \ref
|
||||||
/// but only by the \ref txn_managed::commit() and \ref env::sync_to_disk()
|
/// env::sync_to_disk() functions. Therefore, in cases where transactions are
|
||||||
/// functions. Therefore, in cases where transactions are committed
|
/// committed infrequently and/or irregularly, polling by \ref
|
||||||
/// infrequently and/or irregularly, polling by \ref env::poll_sync_to_disk()
|
/// env::poll_sync_to_disk() may be a reasonable solution to timeout
|
||||||
/// may be a reasonable solution to timeout enforcement. The default is 0,
|
/// enforcement.
|
||||||
/// than mean no any timeout checked, and no additional flush will be made.
|
|
||||||
///
|
///
|
||||||
|
/// The default is 0, than mean no any timeout checked, and no additional
|
||||||
|
/// flush will be made.
|
||||||
|
/// \see extra_runtime_option::sync_period
|
||||||
|
inline env &set_sync_period(const duration &period);
|
||||||
|
|
||||||
|
/// \brief Gets relative period since the last unsteady commit that used to
|
||||||
|
/// force flush the data buffers to disk, for non-sync durability modes.
|
||||||
|
/// \copydetails set_sync_period(const duration&)
|
||||||
|
/// \see set_sync_period(const duration&)
|
||||||
|
/// \see extra_runtime_option::sync_period
|
||||||
|
inline duration sync_period() const;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/// \copydoc set_sync_period(const duration&)
|
||||||
/// \param [in] seconds_16dot16 The period in 1/65536 of second when a
|
/// \param [in] seconds_16dot16 The period in 1/65536 of second when a
|
||||||
/// synchronous flush would be made since the last unsteady commit.
|
/// synchronous flush would be made since the last unsteady commit.
|
||||||
inline env &set_sync_period(unsigned seconds_16dot16);
|
inline env &set_sync_period__seconds_16dot16(unsigned seconds_16dot16);
|
||||||
|
|
||||||
/// \brief Sets relative period since the last unsteady commit to force flush
|
/// \copydoc sync_period()
|
||||||
/// the data buffers to disk, for non-sync durability modes.
|
/// \see sync_period__seconds_16dot16(unsigned)
|
||||||
///
|
inline unsigned sync_period__seconds_16dot16() const;
|
||||||
/// The relative period value affects all processes which operates with given
|
|
||||||
/// environment until the last process close environment or a new value will
|
/// \copydoc set_sync_period(const duration&)
|
||||||
/// be settled.
|
|
||||||
/// Data is always written to disk when \ref txn_managed::commit() is called,
|
|
||||||
/// but the operating system may keep it buffered. MDBX always flushes the OS
|
|
||||||
/// buffers upon commit as well, unless the environment was opened with \ref
|
|
||||||
/// whole_fragile, \ref lazy_weak_tail or in part \ref
|
|
||||||
/// half_synchronous_weak_last. Settled period don't checked asynchronously,
|
|
||||||
/// but only by the \ref txn_managed::commit() and \ref env::sync_to_disk()
|
|
||||||
/// functions. Therefore, in cases where transactions are committed
|
|
||||||
/// infrequently and/or irregularly, polling by \ref env::poll_sync_to_disk()
|
|
||||||
/// may be a reasonable solution to timeout enforcement. The default is 0,
|
|
||||||
/// than mean no any timeout checked, and no additional flush will be made.
|
|
||||||
///
|
|
||||||
/// \param [in] seconds The period in second when a synchronous flush would
|
/// \param [in] seconds The period in second when a synchronous flush would
|
||||||
/// be made since the last unsteady commit.
|
/// be made since the last unsteady commit.
|
||||||
inline env &set_sync_period(double seconds);
|
inline env &set_sync_period__seconds_double(double seconds);
|
||||||
|
|
||||||
|
/// \copydoc sync_period()
|
||||||
|
/// \see set_sync_period__seconds_double(double)
|
||||||
|
inline double sync_period__seconds_double() const;
|
||||||
|
|
||||||
|
/// \copydoc MDBX_option_t
|
||||||
|
enum class extra_runtime_option {
|
||||||
|
/// \copydoc MDBX_opt_max_db
|
||||||
|
/// \see max_maps() \see env::operate_parameters::max_maps
|
||||||
|
max_maps = MDBX_opt_max_db,
|
||||||
|
/// \copydoc MDBX_opt_max_readers
|
||||||
|
/// \see max_readers() \see env::operate_parameters::max_readers
|
||||||
|
max_readers = MDBX_opt_max_readers,
|
||||||
|
/// \copydoc MDBX_opt_sync_bytes
|
||||||
|
/// \see sync_threshold() \see set_sync_threshold()
|
||||||
|
sync_bytes = MDBX_opt_sync_bytes,
|
||||||
|
/// \copydoc MDBX_opt_sync_period
|
||||||
|
/// \see sync_period() \see set_sync_period()
|
||||||
|
sync_period = MDBX_opt_sync_period,
|
||||||
|
/// \copydoc MDBX_opt_rp_augment_limit
|
||||||
|
rp_augment_limit = MDBX_opt_rp_augment_limit,
|
||||||
|
/// \copydoc MDBX_opt_loose_limit
|
||||||
|
loose_limit = MDBX_opt_loose_limit,
|
||||||
|
/// \copydoc MDBX_opt_dp_reserve_limit
|
||||||
|
dp_reserve_limit = MDBX_opt_dp_reserve_limit,
|
||||||
|
/// \copydoc MDBX_opt_txn_dp_limit
|
||||||
|
dp_limit = MDBX_opt_txn_dp_limit,
|
||||||
|
/// \copydoc MDBX_opt_txn_dp_initial
|
||||||
|
dp_initial = MDBX_opt_txn_dp_initial,
|
||||||
|
/// \copydoc MDBX_opt_spill_max_denominator
|
||||||
|
spill_max_denominator = MDBX_opt_spill_max_denominator,
|
||||||
|
/// \copydoc MDBX_opt_spill_min_denominator
|
||||||
|
spill_min_denominator = MDBX_opt_spill_min_denominator,
|
||||||
|
/// \copydoc MDBX_opt_spill_parent4child_denominator
|
||||||
|
spill_parent4child_denominator = MDBX_opt_spill_parent4child_denominator,
|
||||||
|
/// \copydoc MDBX_opt_merge_threshold_16dot16_percent
|
||||||
|
merge_threshold_16dot16_percent = MDBX_opt_merge_threshold_16dot16_percent,
|
||||||
|
/// \copydoc MDBX_opt_writethrough_threshold
|
||||||
|
writethrough_threshold = MDBX_opt_writethrough_threshold,
|
||||||
|
/// \copydoc MDBX_opt_prefault_write_enable
|
||||||
|
prefault_write_enable = MDBX_opt_prefault_write_enable,
|
||||||
|
};
|
||||||
|
|
||||||
|
/// \copybrief mdbx_env_set_option()
|
||||||
|
inline env &set_extra_option(extra_runtime_option option, uint64_t value);
|
||||||
|
|
||||||
|
/// \copybrief mdbx_env_get_option()
|
||||||
|
inline uint64_t extra_option(extra_runtime_option option) const;
|
||||||
|
|
||||||
/// \brief Alter environment flags.
|
/// \brief Alter environment flags.
|
||||||
inline env &alter_flags(MDBX_env_flags_t flags, bool on_off);
|
inline env &alter_flags(MDBX_env_flags_t flags, bool on_off);
|
||||||
@ -3591,7 +3700,7 @@ public:
|
|||||||
void close(bool dont_sync = false);
|
void close(bool dont_sync = false);
|
||||||
|
|
||||||
env_managed(env_managed &&) = default;
|
env_managed(env_managed &&) = default;
|
||||||
env_managed &operator=(env_managed &&other) {
|
env_managed &operator=(env_managed &&other) noexcept {
|
||||||
if (MDBX_UNLIKELY(handle_))
|
if (MDBX_UNLIKELY(handle_))
|
||||||
MDBX_CXX20_UNLIKELY {
|
MDBX_CXX20_UNLIKELY {
|
||||||
assert(handle_ != other.handle_);
|
assert(handle_ != other.handle_);
|
||||||
@ -3890,7 +3999,7 @@ class LIBMDBX_API_TYPE txn_managed : public txn {
|
|||||||
public:
|
public:
|
||||||
MDBX_CXX11_CONSTEXPR txn_managed() noexcept = default;
|
MDBX_CXX11_CONSTEXPR txn_managed() noexcept = default;
|
||||||
txn_managed(txn_managed &&) = default;
|
txn_managed(txn_managed &&) = default;
|
||||||
txn_managed &operator=(txn_managed &&other) {
|
txn_managed &operator=(txn_managed &&other) noexcept {
|
||||||
if (MDBX_UNLIKELY(handle_))
|
if (MDBX_UNLIKELY(handle_))
|
||||||
MDBX_CXX20_UNLIKELY {
|
MDBX_CXX20_UNLIKELY {
|
||||||
assert(handle_ != other.handle_);
|
assert(handle_ != other.handle_);
|
||||||
@ -4112,7 +4221,7 @@ public:
|
|||||||
void close();
|
void close();
|
||||||
|
|
||||||
cursor_managed(cursor_managed &&) = default;
|
cursor_managed(cursor_managed &&) = default;
|
||||||
cursor_managed &operator=(cursor_managed &&other) {
|
cursor_managed &operator=(cursor_managed &&other) noexcept {
|
||||||
if (MDBX_UNLIKELY(handle_))
|
if (MDBX_UNLIKELY(handle_))
|
||||||
MDBX_CXX20_UNLIKELY {
|
MDBX_CXX20_UNLIKELY {
|
||||||
assert(handle_ != other.handle_);
|
assert(handle_ != other.handle_);
|
||||||
@ -5056,13 +5165,53 @@ inline env &env::set_sync_threshold(size_t bytes) {
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline env &env::set_sync_period(unsigned seconds_16dot16) {
|
inline size_t env::sync_threshold() const {
|
||||||
|
size_t bytes;
|
||||||
|
error::success_or_throw(::mdbx_env_get_syncbytes(handle_, &bytes));
|
||||||
|
return bytes;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline env &env::set_sync_period__seconds_16dot16(unsigned seconds_16dot16) {
|
||||||
error::success_or_throw(::mdbx_env_set_syncperiod(handle_, seconds_16dot16));
|
error::success_or_throw(::mdbx_env_set_syncperiod(handle_, seconds_16dot16));
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline env &env::set_sync_period(double seconds) {
|
inline unsigned env::sync_period__seconds_16dot16() const {
|
||||||
return set_sync_period(unsigned(seconds * 65536));
|
unsigned seconds_16dot16;
|
||||||
|
error::success_or_throw(::mdbx_env_get_syncperiod(handle_, &seconds_16dot16));
|
||||||
|
return seconds_16dot16;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline env &env::set_sync_period__seconds_double(double seconds) {
|
||||||
|
return set_sync_period__seconds_16dot16(unsigned(seconds * 65536));
|
||||||
|
}
|
||||||
|
|
||||||
|
inline double env::sync_period__seconds_double() const {
|
||||||
|
return sync_period__seconds_16dot16() / 65536.0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#if __cplusplus >= 201103L
|
||||||
|
inline env &env::set_sync_period(const duration &period) {
|
||||||
|
return set_sync_period__seconds_16dot16(period.count());
|
||||||
|
}
|
||||||
|
|
||||||
|
inline duration env::sync_period() const {
|
||||||
|
return duration(sync_period__seconds_16dot16());
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
inline env &env::set_extra_option(enum env::extra_runtime_option option,
|
||||||
|
uint64_t value) {
|
||||||
|
error::success_or_throw(
|
||||||
|
::mdbx_env_set_option(handle_, ::MDBX_option_t(option), value));
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline uint64_t env::extra_option(enum env::extra_runtime_option option) const {
|
||||||
|
uint64_t value;
|
||||||
|
error::success_or_throw(
|
||||||
|
::mdbx_env_get_option(handle_, ::MDBX_option_t(option), &value));
|
||||||
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline env &env::alter_flags(MDBX_env_flags_t flags, bool on_off) {
|
inline env &env::alter_flags(MDBX_env_flags_t flags, bool on_off) {
|
||||||
|
|||||||
1091
crates/storage/libmdbx-rs/mdbx-sys/libmdbx/mdbx_chk.c
vendored
1091
crates/storage/libmdbx-rs/mdbx-sys/libmdbx/mdbx_chk.c
vendored
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user