Skip to content

Commit

Permalink
save
Browse files Browse the repository at this point in the history
  • Loading branch information
AskAlexSharov committed Aug 5, 2024
1 parent 9e6df54 commit 09542ff
Show file tree
Hide file tree
Showing 21 changed files with 1,537 additions and 1,456 deletions.
842 changes: 418 additions & 424 deletions mdbx/mdbx.c

Large diffs are not rendered by default.

488 changes: 267 additions & 221 deletions mdbx/mdbx.h

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions mdbxdist/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.git" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/sort.h" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/spill.c" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/spill.h" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/subdb.c" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/table.c" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/tls.c" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/tls.h" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/tools/chk.c" AND
Expand Down Expand Up @@ -749,7 +749,7 @@ else()
"${MDBX_SOURCE_DIR}/sort.h"
"${MDBX_SOURCE_DIR}/spill.c"
"${MDBX_SOURCE_DIR}/spill.h"
"${MDBX_SOURCE_DIR}/subdb.c"
"${MDBX_SOURCE_DIR}/table.c"
"${MDBX_SOURCE_DIR}/tls.c"
"${MDBX_SOURCE_DIR}/tls.h"
"${MDBX_SOURCE_DIR}/tree.c"
Expand Down
23 changes: 12 additions & 11 deletions mdbxdist/ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
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 liar 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).

## v0.13.1 (в процессе подготовки выпуска)
Expand Down Expand Up @@ -44,7 +44,7 @@ and [by Yandex](https://translated.turbopages.org/proxy_u/ru-en.en/https/gitflic
припаркованных транзакций является как дополнением, так и более простой
в использовании альтернативой обратному вызову
[Handle-Slow-Readers](https://libmdbx.dqdkfa.ru/group__c__err.html#ga2cb11b56414c282fe06dd942ae6cade6).
Для удобства функции `mdbx_txn_park()` и `mdbx_txn_unpack()` имеют
Для удобства функции `mdbx_txn_park()` и `mdbx_txn_unpark()` имеют
дополнительные аргументы, позволяющие запросить автоматическую
"распарковку" припаркованных и перезапуск вытесненных транзакций.

Expand Down Expand Up @@ -75,7 +75,7 @@ and [by Yandex](https://translated.turbopages.org/proxy_u/ru-en.en/https/gitflic
- Функция `mdbx_preopen_snapinfo()` для получения информации о БД без
её открытия.

- Функция `mdbx_enumerate_subdb()` для получение информации
- Функция `mdbx_enumerate_tables()` для получение информации
об именованных пользовательских таблицах.

- Поддержка функций логирования обратного вызова без функционала
Expand Down Expand Up @@ -109,19 +109,19 @@ and [by Yandex](https://translated.turbopages.org/proxy_u/ru-en.en/https/gitflic

- Расширение и доработка C++ API:

- добавлен тип `mdbx::cursor::estimation_result`, а поведение методов
`cursor::estimate()` унифицировано с `cursor::move()`;
- добавлен тип `mdbx::cursor::estimate_result`, а поведение методов
`mdbx::cursor::estimate()` унифицировано с `mdbx::cursor::move()`;
- для предотвращения незаметного неверного использования API, для инициализации
возвращаемых по ссылке срезов, вместо пустых срезов задействован `slice::invalid()`;
возвращаемых по ссылке срезов, вместо пустых срезов задействован `mdbx::slice::invalid()`;
- добавлены дополнительные C++ операторы преобразования к типам C API;
- для совместимости со старыми стандартами C++ и старыми версиями STL перенесены
в public классы `buffer::move_assign_alloc` и `buffer::copy_assign_alloc`;
в public классы `mdbx::buffer::move_assign_alloc` и `mdbx::buffer::copy_assign_alloc`;
- добавлен тип `mdbx::default_buffer`;
- для срезов и буферов добавлены методы `hex_decode()`, `base64_decode()`, `base58_decode()`;
- для срезов и буферов добавлены методы `mdbx::buffer::hex_decode()`, `mdbx::buffer::base64_decode()`, `mdbx::buffer::base58_decode()`;
- добавлен тип `mdbx::comparator` и функций `mdbx::default_comparator()`;
- добавлены статические методы `buffer::hex()`, `base64()`, `base58()`;
- добавлены статические методы `mdbx::buffer::hex()`, `mdbx::buffer::base64()`, `mdbx::buffer::base58()`;
- для транзакций и курсоров добавлены методы `get_/set_context`;
- добавлен метод `cursor::clone()`;
- добавлен метод `mdbx::cursor::clone()`;
- поддержка base58 переработана и приведена в соответствии с черновиком RFC,
в текущем понимании теперь это одна из самых высокопроизводительных реализаций base58;
- переработка `to_hex()` и `from_hex()`;
Expand All @@ -131,6 +131,7 @@ and [by Yandex](https://translated.turbopages.org/proxy_u/ru-en.en/https/gitflic

Нарушение совместимости:

- Использование термина "таблица" вместо "subDb".
- Опция `MDBX_COALESCE` объявлена устаревшей, так как соответствующий функционал всегда включен начиная с предыдущей версии 0.12.
- Опция `MDBX_NOTLS` объявлена устаревшей и заменена на `MDBX_NOSTICKYTHREADS`.
- Опция сборки `MDBX_USE_VALGRIND` заменена на общепринятую `ENABLE_MEMCHECK`.
Expand Down Expand Up @@ -334,7 +335,7 @@ Signed-off-by: Леонид Юрьев (Leonid Yuriev) <leo@yuriev.ru>

- Из разрабатываемой версии перенесены не-нарушающие совместимости доработки C++ API:

- добавлен тип `mdbx::cursor::estimation_result`, а поведение методов
- добавлен тип `mdbx::cursor::estimate_result`, а поведение методов
`cursor::estimate()` унифицировано с `cursor::move()`;
- для предотвращения незаметного неверного использования API, для инициализации
возвращаемых по ссылке срезов, вместо пустых срезов задействован `slice::invalid()`;
Expand Down
8 changes: 4 additions & 4 deletions mdbxdist/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ $ cc --version
[MVCC](https://en.wikipedia.org/wiki/Multiversion_concurrency_control)
and [CoW](https://en.wikipedia.org/wiki/Copy-on-write).

- Multiple key-value sub-databases within a single datafile.
- Multiple key-value tables/sub-databases within a single datafile.

- Range lookups, including range query estimation.

Expand Down Expand Up @@ -204,7 +204,7 @@ transaction journal. No crash recovery needed. No maintenance is required.
- **Value size**: minimum `0`, maximum `2146435072` (`0x7FF00000`) bytes for maps, ≈½ pagesize for multimaps (`2022` bytes for default 4K pagesize, `32742` bytes for 64K pagesize).
- **Write transaction size**: up to `1327217884` pages (`4.944272` TiB for default 4K pagesize, `79.108351` TiB for 64K pagesize).
- **Database size**: up to `2147483648` pages (≈`8.0` TiB for default 4K pagesize, ≈`128.0` TiB for 64K pagesize).
- **Maximum sub-databases**: `32765`.
- **Maximum tables/sub-databases**: `32765`.

## Gotchas

Expand Down Expand Up @@ -298,7 +298,7 @@ and/or optimize query execution plans.
11. Ability to determine whether the particular data is on a dirty page
or not, that allows to avoid copy-out before updates.

12. Extended information of whole-database, sub-databases, transactions, readers enumeration.
12. Extended information of whole-database, tables/sub-databases, transactions, readers enumeration.
> _libmdbx_ provides a lot of information, including dirty and leftover pages
> for a write transaction, reading lag and holdover space for read transactions.
Expand All @@ -321,7 +321,7 @@ pair, to the first, to the last, or not set to anything.
## Other fixes and specifics

1. Fixed more than 10 significant errors, in particular: page leaks,
wrong sub-database statistics, segfault in several conditions,
wrong table/sub-database statistics, segfault in several conditions,
nonoptimal page merge strategy, updating an existing record with
a change in data size (including for multimap), etc.

Expand Down
2 changes: 1 addition & 1 deletion mdbxdist/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.13.0.110
0.13.0.115
6 changes: 3 additions & 3 deletions mdbxdist/man1/mdbx_chk.1
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ mdbx_chk \- MDBX checking tool
[\c
.BR \-i ]
[\c
.BI \-s \ subdb\fR]
.BI \-s \ table\fR]
.BR \ dbpath
.SH DESCRIPTION
The
Expand Down Expand Up @@ -69,8 +69,8 @@ pages.
Ignore wrong order errors, which will likely false-positive if custom
comparator(s) was used.
.TP
.BR \-s \ subdb
Verify and show info only for a specific subdatabase.
.BR \-s \ table
Verify and show info only for a specific table.
.TP
.BR \-0 | \-1 | \-2
Using specific meta-page 0, or 2 for checking.
Expand Down
6 changes: 3 additions & 3 deletions mdbxdist/man1/mdbx_drop.1
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ mdbx_drop \- MDBX database delete tool
[\c
.BR \-d ]
[\c
.BI \-s \ subdb\fR]
.BI \-s \ table\fR]
[\c
.BR \-n ]
.BR \ dbpath
Expand All @@ -28,8 +28,8 @@ Write the library version number to the standard output, and exit.
.BR \-d
Delete the specified database, don't just empty it.
.TP
.BR \-s \ subdb
Operate on a specific subdatabase. If no database is specified, only the main database is dropped.
.BR \-s \ table
Operate on a specific table. If no table is specified, only the main table is dropped.
.TP
.BR \-n
Dump an MDBX database which does not use subdirectories.
Expand Down
8 changes: 4 additions & 4 deletions mdbxdist/man1/mdbx_dump.1
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ mdbx_dump \- MDBX environment export tool
.BR \-p ]
[\c
.BR \-a \ |
.BI \-s \ subdb\fR]
.BI \-s \ table\fR]
[\c
.BR \-r ]
[\c
Expand Down Expand Up @@ -58,10 +58,10 @@ are considered printing characters, and databases dumped in this manner may
be less portable to external systems.
.TP
.BR \-a
Dump all of the subdatabases in the environment.
Dump all of the tables in the environment.
.TP
.BR \-s \ subdb
Dump a specific subdatabase. If no database is specified, only the main database is dumped.
.BR \-s \ table
Dump a specific table. If no database is specified, only the main table is dumped.
.TP
.BR \-r
Rescure mode. Ignore some errors to dump corrupted DB.
Expand Down
8 changes: 4 additions & 4 deletions mdbxdist/man1/mdbx_load.1
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ mdbx_load \- MDBX environment import tool
[\c
.BI \-f \ file\fR]
[\c
.BI \-s \ subdb\fR]
.BI \-s \ table\fR]
[\c
.BR \-N ]
[\c
Expand Down Expand Up @@ -71,11 +71,11 @@ on a database that uses custom compare functions.
.BR \-f \ file
Read from the specified file instead of from the standard input.
.TP
.BR \-s \ subdb
Load a specific subdatabase. If no database is specified, data is loaded into the main database.
.BR \-s \ table
Load a specific table. If no table is specified, data is loaded into the main table.
.TP
.BR \-N
Don't overwrite existing records when loading into an already existing database; just skip them.
Don't overwrite existing records when loading into an already existing table; just skip them.
.TP
.BR \-T
Load data from simple text files. The input must be paired lines of text, where the first
Expand Down
8 changes: 4 additions & 4 deletions mdbxdist/man1/mdbx_stat.1
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ mdbx_stat \- MDBX environment status tool
.BR \-r [ r ]]
[\c
.BR \-a \ |
.BI \-s \ subdb\fR]
.BI \-s \ table\fR]
.BR \ dbpath
[\c
.BR \-n ]
Expand Down Expand Up @@ -61,10 +61,10 @@ table and clear them. The reader table will be printed again
after the check is performed.
.TP
.BR \-a
Display the status of all of the subdatabases in the environment.
Display the status of all of the tables in the environment.
.TP
.BR \-s \ subdb
Display the status of a specific subdatabase.
.BR \-s \ table
Display the status of a specific table.
.TP
.BR \-n
Display the status of an MDBX database which does not use subdirectories.
Expand Down
Loading

0 comments on commit 09542ff

Please sign in to comment.