Skip to content

Commit f8885bc

Browse files
JkLondonJkLondon
andauthored
new v0.14.1 (#194)
Co-authored-by: JkLondon <ilya@mikheev.fun>
1 parent 2f79b03 commit f8885bc

19 files changed

+4725
-3681
lines changed

libmdbx/CMakeLists.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,8 @@ if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.git"
132132
AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/preface.h"
133133
AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/proto.h"
134134
AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/refund.c"
135+
AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/rkl.c"
136+
AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/rkl.h"
135137
AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/sort.h"
136138
AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/spill.c"
137139
AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/spill.h"
@@ -149,6 +151,9 @@ if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.git"
149151
AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/tree-ops.c"
150152
AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/txl.c"
151153
AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/txl.h"
154+
AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/txn-basal.c"
155+
AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/txn-nested.c"
156+
AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/txn-ro.c"
152157
AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/txn.c"
153158
AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/unaligned.h"
154159
AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/utils.c"
@@ -829,6 +834,8 @@ else()
829834
"${MDBX_SOURCE_DIR}/preface.h"
830835
"${MDBX_SOURCE_DIR}/proto.h"
831836
"${MDBX_SOURCE_DIR}/refund.c"
837+
"${MDBX_SOURCE_DIR}/rkl.c"
838+
"${MDBX_SOURCE_DIR}/rkl.h"
832839
"${MDBX_SOURCE_DIR}/sort.h"
833840
"${MDBX_SOURCE_DIR}/spill.c"
834841
"${MDBX_SOURCE_DIR}/spill.h"
@@ -838,6 +845,9 @@ else()
838845
"${MDBX_SOURCE_DIR}/tree-ops.c"
839846
"${MDBX_SOURCE_DIR}/txl.c"
840847
"${MDBX_SOURCE_DIR}/txl.h"
848+
"${MDBX_SOURCE_DIR}/txn-basal.c"
849+
"${MDBX_SOURCE_DIR}/txn-nested.c"
850+
"${MDBX_SOURCE_DIR}/txn-ro.c"
841851
"${MDBX_SOURCE_DIR}/txn.c"
842852
"${MDBX_SOURCE_DIR}/unaligned.h"
843853
"${MDBX_SOURCE_DIR}/utils.c"

libmdbx/ChangeLog.md

Lines changed: 354 additions & 1134 deletions
Large diffs are not rendered by default.

libmdbx/README.md

Lines changed: 32 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,5 @@
11
<!-- Required extensions: pymdownx.betterem, pymdownx.tilde, pymdownx.emoji, pymdownx.tasklist, pymdownx.superfences -->
22

3-
> Please refer to the online [documentation](https://libmdbx.dqdkfa.ru)
4-
> with [`C` API description](https://libmdbx.dqdkfa.ru/group__c__api.html)
5-
> and pay attention to the [`C++` API](https://gitflic.ru/project/erthink/libmdbx/blob?file=mdbx.h%2B%2B#line-num-1).
6-
7-
> Questions, feedback and suggestions are welcome to the [Telegram' group](https://t.me/libmdbx) (archive [1](https://libmdbx.dqdkfa.ru/tg-archive/messages1.html),
8-
> [2](https://libmdbx.dqdkfa.ru/tg-archive/messages2.html), [3](https://libmdbx.dqdkfa.ru/tg-archive/messages3.html), [4](https://libmdbx.dqdkfa.ru/tg-archive/messages4.html),
9-
> [5](https://libmdbx.dqdkfa.ru/tg-archive/messages5.html), [6](https://libmdbx.dqdkfa.ru/tg-archive/messages6.html), [7](https://libmdbx.dqdkfa.ru/tg-archive/messages7.html)).
10-
> See the [ChangeLog](https://gitflic.ru/project/erthink/libmdbx/blob?file=ChangeLog.md) for `NEWS` and latest updates.
11-
12-
> Donations are welcome to the Ethereum/ERC-20 `0xD104d8f8B2dC312aaD74899F83EBf3EEBDC1EA3A`.
13-
> Всё будет хорошо!
14-
153
libmdbx
164
========
175

@@ -38,32 +26,44 @@ tree](https://en.wikipedia.org/wiki/B%2B_tree).
3826
[WAL](https://en.wikipedia.org/wiki/Write-ahead_logging), but that might
3927
be a caveat for write-intensive workloads with durability requirements.
4028

41-
4. **Compact and friendly for fully embedding**. Only ≈25KLOC of `C11`,
42-
≈64K x86 binary code of core, no internal threads neither server process(es),
43-
but implements a simplified variant of the [Berkeley
44-
DB](https://en.wikipedia.org/wiki/Berkeley_DB) and
45-
[dbm](https://en.wikipedia.org/wiki/DBM_(computing)) API.
46-
47-
5. Enforces [serializability](https://en.wikipedia.org/wiki/Serializability) for
29+
4. Enforces [serializability](https://en.wikipedia.org/wiki/Serializability) for
4830
writers just by single
4931
[mutex](https://en.wikipedia.org/wiki/Mutual_exclusion) and affords
5032
[wait-free](https://en.wikipedia.org/wiki/Non-blocking_algorithm#Wait-freedom)
5133
for parallel readers without atomic/interlocked operations, while
5234
**writing and reading transactions do not block each other**.
5335

54-
6. **Guarantee data integrity** after crash unless this was explicitly
36+
5. **Guarantee data integrity** after crash unless this was explicitly
5537
neglected in favour of write performance.
5638

57-
7. Supports Linux, Windows, MacOS, Android, iOS, FreeBSD, DragonFly, Solaris,
39+
6. Supports Linux, Windows, MacOS, Android, iOS, FreeBSD, DragonFly, Solaris,
5840
OpenSolaris, OpenIndiana, NetBSD, OpenBSD and other systems compliant with
5941
**POSIX.1-2008**.
6042

43+
7. **Compact and friendly for fully embedding**. Only ≈25KLOC of `C11`,
44+
≈64K x86 binary code of core, no internal threads neither server process(es),
45+
but implements a simplified variant of the [Berkeley
46+
DB](https://en.wikipedia.org/wiki/Berkeley_DB) and
47+
[dbm](https://en.wikipedia.org/wiki/DBM_(computing)) API.
48+
6149
<!-- section-end -->
6250

63-
Historically, _libmdbx_ is a deeply revised and extended descendant of the amazing
51+
Historically, _libmdbx_ is a deeply revised and extended descendant of the legendary
6452
[Lightning Memory-Mapped Database](https://en.wikipedia.org/wiki/Lightning_Memory-Mapped_Database).
6553
_libmdbx_ inherits all benefits from _LMDB_, but resolves some issues and adds [a set of improvements](#improvements-beyond-lmdb).
6654

55+
[![Telergam: Support | Discussions | News](https://img.shields.io/endpoint?color=scarlet&logo=telegram&label=Support%20%7C%20Discussions%20%7C%20News&url=https%3A%2F%2Ftg.sumanjay.workers.dev%2Flibmdbx)](https://t.me/libmdbx)
56+
57+
> Please refer to the online [documentation](https://libmdbx.dqdkfa.ru)
58+
> with [`C` API description](https://libmdbx.dqdkfa.ru/group__c__api.html)
59+
> and pay attention to the [`C++` API](https://gitflic.ru/project/erthink/libmdbx/blob?file=mdbx.h%2B%2B#line-num-1).
60+
> Donations are welcome to the Ethereum/ERC-20 `0xD104d8f8B2dC312aaD74899F83EBf3EEBDC1EA3A`.
61+
> Всё будет хорошо!
62+
63+
Telegram Group archive: [1](https://libmdbx.dqdkfa.ru/tg-archive/messages1.html),
64+
[2](https://libmdbx.dqdkfa.ru/tg-archive/messages2.html), [3](https://libmdbx.dqdkfa.ru/tg-archive/messages3.html), [4](https://libmdbx.dqdkfa.ru/tg-archive/messages4.html),
65+
[5](https://libmdbx.dqdkfa.ru/tg-archive/messages5.html), [6](https://libmdbx.dqdkfa.ru/tg-archive/messages6.html), [7](https://libmdbx.dqdkfa.ru/tg-archive/messages7.html).
66+
6767
## Github
6868

6969
### на Русском (мой родной язык)
@@ -125,8 +125,7 @@ of the database. All fundamental architectural problems of libmdbx/LMDB
125125
have been solved there, but now the active development has been
126126
suspended for top-three reasons:
127127

128-
1. For now _libmdbx_ «mostly» enough for all [our products](https://www.ptsecurity.com/ww-en/products/),
129-
and I’m busy in development of replication for scalability.
128+
1. For now _libmdbx_ mostly enough and I’m busy for scalability.
130129
2. Waiting for fresh [Elbrus CPU](https://wiki.elbrus.ru/) of [e2k architecture](https://en.wikipedia.org/wiki/Elbrus_2000),
131130
especially with hardware acceleration of [Streebog](https://en.wikipedia.org/wiki/Streebog) and
132131
[Kuznyechik](https://en.wikipedia.org/wiki/Kuznyechik), which are required for Merkle tree, etc.
@@ -551,9 +550,9 @@ Of course, in addition to this, your toolchain must ensure the reproducibility o
551550
For more information please refer to [reproducible-builds.org](https://reproducible-builds.org/).
552551

553552
#### Containers
554-
There are no special traits nor quirks if you use libmdbx ONLY inside the single container.
555-
But in a cross-container cases or with a host-container(s) mix the two major things MUST be
556-
guaranteed:
553+
There are no special traits nor quirks if you use _libmdbx_ ONLY inside
554+
the single container. But in a cross-container(s) or with a host-container(s)
555+
interoperability cases the three major things MUST be guaranteed:
557556

558557
1. Coherence of memory mapping content and unified page cache inside OS
559558
kernel for host and all container(s) operated with a DB. Basically this
@@ -569,6 +568,12 @@ in the system memory.
569568
including `ERROR_ACCESS_DENIED`,
570569
but not the `ERROR_INVALID_PARAMETER` as for an invalid/non-existent PID.
571570

571+
3. The versions/builds of _libmdbx_ and `libc`/`pthreads` (`glibc`, `musl`, etc) must be be compatible.
572+
- Basically, the `options:` string in the output of `mdbx_chk -V` must be the same for host and container(s).
573+
See `MDBX_LOCKING`, `MDBX_USE_OFDLOCKS` and other build options for details.
574+
- Avoid using different versions of `libc`, especially mixing different implementations, i.e. `glibc` with `musl`, etc.
575+
Prefer to use the same LTS version, or switch to full virtualization/isolation if in doubt.
576+
572577
#### DSO/DLL unloading and destructors of Thread-Local-Storage objects
573578
When building _libmdbx_ as a shared library or use static _libmdbx_ as a
574579
part of another dynamic library, it is advisable to make sure that your

libmdbx/VERSION.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{ "git_describe": "v0.13.6-0-ga971c76a", "git_timestamp": "2025-04-22T11:53:23+03:00", "git_tree": "4ca2c913e8614a1ed09512353faa227f25245e9f", "git_commit": "a971c76afffbb2ce0aa6151f4683b94fe10dc843", "semver": "0.13.6" }
1+
{ "git_describe": "v0.14.1-0-ga13147d1", "git_timestamp": "2025-05-06T14:15:36+03:00", "git_tree": "1c8f0e50d4b62e8e5a881a86b049d6a3e17a3edd", "git_commit": "a13147d115ff87e76046d019af5a60b42f4ad323", "semver": "0.14.1" }

libmdbx/man1/mdbx_chk.1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.\" Copyright 2015-2025 Leonid Yuriev <leo@yuriev.ru>.
22
.\" Copying restrictions apply. See COPYRIGHT/LICENSE.
3-
.TH MDBX_CHK 1 "2024-08-29" "MDBX 0.13"
3+
.TH MDBX_CHK 1 "2025-01-14" "MDBX 0.14"
44
.SH NAME
55
mdbx_chk \- MDBX checking tool
66
.SH SYNOPSIS

libmdbx/man1/mdbx_copy.1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
.\" Copyright 2015,2016 Peter-Service R&D LLC <http://billing.ru/>.
33
.\" Copyright 2012-2015 Howard Chu, Symas Corp. All Rights Reserved.
44
.\" Copying restrictions apply. See COPYRIGHT/LICENSE.
5-
.TH MDBX_COPY 1 "2024-08-29" "MDBX 0.13"
5+
.TH MDBX_COPY 1 "2025-01-14" "MDBX 0.14"
66
.SH NAME
77
mdbx_copy \- MDBX environment copy tool
88
.SH SYNOPSIS

libmdbx/man1/mdbx_drop.1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.\" Copyright 2021-2025 Leonid Yuriev <leo@yuriev.ru>.
22
.\" Copyright 2014-2021 Howard Chu, Symas Corp. All Rights Reserved.
33
.\" Copying restrictions apply. See COPYRIGHT/LICENSE.
4-
.TH MDBX_DROP 1 "2024-08-29" "MDBX 0.13"
4+
.TH MDBX_DROP 1 "2025-01-14" "MDBX 0.14"
55
.SH NAME
66
mdbx_drop \- MDBX database delete tool
77
.SH SYNOPSIS

libmdbx/man1/mdbx_dump.1

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
.\" Copyright 2015,2016 Peter-Service R&D LLC <http://billing.ru/>.
33
.\" Copyright 2014-2015 Howard Chu, Symas Corp. All Rights Reserved.
44
.\" Copying restrictions apply. See COPYRIGHT/LICENSE.
5-
.TH MDBX_DUMP 1 "2024-08-29" "MDBX 0.13"
5+
.TH MDBX_DUMP 1 "2025-01-14" "MDBX 0.14"
66
.SH NAME
77
mdbx_dump \- MDBX environment export tool
88
.SH SYNOPSIS
@@ -12,6 +12,8 @@ mdbx_dump \- MDBX environment export tool
1212
[\c
1313
.BR \-q ]
1414
[\c
15+
.BR \-c ]
16+
[\c
1517
.BI \-f \ file\fR]
1618
[\c
1719
.BR \-l ]
@@ -41,6 +43,9 @@ Write the library version number to the standard output, and exit.
4143
.BR \-q
4244
Be quiet.
4345
.TP
46+
.BR \-c
47+
Concise mode without repeating keys in a dump, but incompatible with Berkeley DB and LMDB.
48+
.TP
4449
.BR \-f \ file
4550
Write to the specified file instead of to the standard output.
4651
.TP

libmdbx/man1/mdbx_load.1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
.\" Copyright 2015,2016 Peter-Service R&D LLC <http://billing.ru/>.
33
.\" Copyright 2014-2015 Howard Chu, Symas Corp. All Rights Reserved.
44
.\" Copying restrictions apply. See COPYRIGHT/LICENSE.
5-
.TH MDBX_LOAD 1 "2024-08-29" "MDBX 0.13"
5+
.TH MDBX_LOAD 1 "2025-01-14" "MDBX 0.14"
66
.SH NAME
77
mdbx_load \- MDBX environment import tool
88
.SH SYNOPSIS

libmdbx/man1/mdbx_stat.1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
.\" Copyright 2015,2016 Peter-Service R&D LLC <http://billing.ru/>.
33
.\" Copyright 2012-2015 Howard Chu, Symas Corp. All Rights Reserved.
44
.\" Copying restrictions apply. See COPYRIGHT/LICENSE.
5-
.TH MDBX_STAT 1 "2024-08-29" "MDBX 0.13"
5+
.TH MDBX_STAT 1 "2025-01-14" "MDBX 0.14"
66
.SH NAME
77
mdbx_stat \- MDBX environment status tool
88
.SH SYNOPSIS

0 commit comments

Comments
 (0)