Leonid Yuriev
077989bfed
mdbx: adds pre- and post- gaps to dirty page list to avoid some comparisons and conditional branches.
...
More for https://github.com/erthink/libmdbx/issues/132
Change-Id: I6562c5ff6c559341bb7bb64222b126f06cc13427
2021-01-31 23:20:49 +03:00
Leonid Yuriev
df180d1d36
mdbx: provide the gap/reserve for ability of merge sort dirty-page list.
...
Preparation for fix https://github.com/erthink/libmdbx/issues/132
Change-Id: I4aac6927878eb0361588fbfcf9698ba6d2d5fc34
2021-01-31 23:16:10 +03:00
Leonid Yuriev
9f0ff865e8
mdbx: use C11 atomics if available instead of legacy memory barriers.
...
This done better support architectures with a weak/relaxed memory consistency model (ARM, AARCH64, PPC, MIPS, RISC-V, etc).
Change-Id: Iee831c8dc564f1d027ff84b0d6daa559325d5a9b
2021-01-30 02:28:12 +03:00
Leonid Yuriev
f698f07ff9
mdbx: fix operation for unusual small/large system page size.
...
More for https://github.com/erthink/libmdbx/issues/157
Change-Id: I4f2ed54b50653d0375538b82c48590d1037cd93b
2021-01-29 21:19:58 +03:00
Leonid Yuriev
251eda6fb8
mdbx: HNY!
...
Change-Id: I86c7028001b349e3d06b837dc8e2f7e60fb3b1a2
2021-01-26 07:27:13 +03:00
Leonid Yuriev
4ae2a107bf
mdbx: add MDBX_opt_loose_limit
runtime option.
...
More for https://github.com/erthink/libmdbx/issues/128
Change-Id: I298bf1eef24575df72615ee07e93f5073405e8e0
2021-01-22 23:52:03 +03:00
Leonid Yuriev
b82d1d5063
mdbx: add MDBX_opt_spill_parent4child_denominator
runtime option.
...
More for https://github.com/erthink/libmdbx/issues/128
Change-Id: If1549c3855eb59c107eb115e6dbca515e81644f9
2021-01-22 18:18:52 +03:00
Leonid Yuriev
56aaad03bc
mdbx: add MDBX_opt_spill_max_denominator
and MDBX_opt_spill_min_denominator
runtime options.
...
More for https://github.com/erthink/libmdbx/issues/128
Change-Id: I6b1b00e30ac11e9c2e3d3d3a29cc73079b41d539
2021-01-22 17:25:44 +03:00
Leonid Yuriev
730b9ea3fd
mdbx: add MDBX_PNL_ASCENDING
build option and dependency for MDBX_DATA_MAGIC
.
...
Change-Id: I55283240b1dbbbc093927be5eaa5d42b87294f72
2021-01-20 23:31:14 +03:00
Leonid Yuriev
f28da7c9e3
mdbx: rework spilling, page-lists, commit & abort for nested transactions, etc (squashed).
...
Change-Id: I09e4744586342aeae4efcfb71f41a3248ee47758
2021-01-19 23:53:16 +03:00
Leonid Yuriev
7bae2a7cd2
mdbx: provide MDBX_ENABLE_REFUND
build option.
...
Change-Id: I0e4c94a22f3b0957176431709604a7595f85252a
2021-01-19 23:53:16 +03:00
Leonid Yuriev
f6ff075335
mdbx: rework/speedup spill-pages list.
...
Change-Id: I97e63f8d4c82ae682e898e9b04edceb0b01d82a5
2021-01-19 23:53:16 +03:00
Leonid Yuriev
338de2e1fb
mdbx: refine mdbx_page_spill()
.
...
More for https://github.com/erthink/libmdbx/issues/132 .
Change-Id: I40788c13b54453c17d5e5dae6c3d2f93226f8e00
2020-12-04 15:38:26 +03:00
Leonid Yuriev
c5061f9289
mdbx: dynamic dirty-page-list size.
...
Resolve https://github.com/erthink/libmdbx/issues/123
Change-Id: I5d9b2d8c2259132617fd2b226b9d9a6790fcad88
2020-12-03 17:17:07 +03:00
Leonid Yuriev
d8d89cca7d
mdbx: refactor dirty-page-list (preparation to rework).
...
Change-Id: Ib52bb52f73ef1d31f55838d879de081fc0a140c2
2020-12-03 10:25:36 +03:00
Leonid Yuriev
c530c83337
mdbx: drop me_dirtylist
field.
...
Change-Id: I93ee802c1b6ef5c6a2443e19754e1a20dbe0aea9
2020-12-02 20:07:59 +03:00
Leonid Yuriev
0b62453f6d
mdbx: introduce MDBX_PGL_LIMIT
.
...
Change-Id: Ifab1156ec22fb0908284298393f52c09c0731829
2020-12-02 20:07:59 +03:00
Leonid Yuriev
4cd08f0ef9
mdbx: add MDBX_opt_rp_augment_limit
.
...
More for https://github.com/erthink/libmdbx/issues/128
Change-Id: I94f3350b72ad11d0b586aaef1574f7654223bc40
2020-12-02 20:07:55 +03:00
Leonid Yuriev
42019e0b8d
mdbx: add dp_reserve_limit
with 1024 default.
...
More for More for https://github.com/erthink/libmdbx/issues/128
Change-Id: Ia92b1aea58640f183202495e3f6e2d531057afd2
2020-12-02 12:42:16 +03:00
Leonid Yuriev
a8ed534cd3
mdbx: avoid 4-byte aligned (i.e. unaligned) access to 64-bit integers.
...
Historically, the page header provides 4-byte data alignment.
Therefore, unfortunately, the meta page data is also aligned on a 4-byte boundary, but contains 64-bit values.
This commit eliminates potentially unsafe access (SPARC, MIPS, etc) to these 64-bit values aligned on a 4-byte boundary.
Thus, a build with the `-fsanitize=undefined` now passes the tests both with CLANG 11 and GCC 10.
Change-Id: Ie441103e53ed96fd40507d8c0be0689e3fee69f5
2020-12-01 20:23:23 +03:00
Leonid Yuriev
ca115dd6a4
mdbx: refactor/rename/refine tw.cursors
internals.
...
Change-Id: Ie46d15f52a9d7365b52534a630754a31d3005a69
2020-11-16 07:07:38 +03:00
Leonid Yuriev
0f64d0ee95
mdbx: update internal MDBX_NO_ROOT
.
2020-10-30 17:44:51 +03:00
Leonid Yuriev
105947b50c
mdbx: minor refine internals comments/docs.
...
Change-Id: Ie1dd2233259948b4906e66fb191832dbc6526c47
2020-10-29 00:55:12 +03:00
Leonid Yuriev
b964b2abf5
mdbx: more spelling.
...
Change-Id: I45e42c1d8ef51f910b8e41279b92e54a6b2ce772
2020-10-21 01:00:48 +03:00
Leonid Yuriev
7cf92b66cf
mdbx: add LIBMDBX_INLINE_API (both inline and non-inline of some API functions).
...
Change-Id: I00c2b6d3d2a0467080791ea0c1c2242742a20c78
2020-10-17 01:00:36 +03:00
Leonid Yuriev
071ad525c8
mdbx: refine handle_env_pathname()
for direct pathname of data-file inside sudir-mode.
...
Change-Id: I5b7e7c7ea5c17e00c344fedb5c96f8d94fc04fc8
2020-10-11 00:14:53 +03:00
Leonid Yuriev
9bf7d53dc2
mdbx: MAX_MAPSIZE32
value has been reduced to 0x7f000000
.
...
Change-Id: Ia45dd56621cd92441a45b8e80420a124cd111fdc
2020-10-10 00:52:41 +03:00
Leonid Yuriev
f6850f5367
mdbx: Support for user-settable cursor context.
...
Change-Id: I9bd60c432924e39020b2d3af3280f13c44d6cd91
2020-09-29 21:15:25 +03:00
Leonid Yuriev
c8a0951566
mdbx: rework API and Docs around Handle-Slow-Readers (no algorithmic changes).
...
Change-Id: I5b76a8400ce6f5f241f8e4a7f53d746fe39f8e1e
2020-09-29 21:15:25 +03:00
Leonid Yuriev
6294e1710a
mdbx: support for user-settable transaction context.
...
Change-Id: Ib4a345628e2c1ca2f95ac7615ea53d94911e5198
2020-09-29 20:59:55 +03:00
Leonid Yuriev
92bc728f39
mdbx: update warnings/errors for old version GCC/CLANG/MSVC/GLIBC.
...
Change-Id: I355316f6c8d96eae4bd5d9743f0b6e50caddcbcd
2020-09-27 17:01:59 +03:00
Leonid Yuriev
860aa017db
mdbx: Merge branch 'master' into devel.
...
Change-Id: Ic130cd181097332aa2f49019d75403e18d8cba0d
2020-09-25 01:14:57 +03:00
Josh Soref
448728f584
mdbx: a lot of spelling (squashed).
...
Many Thanks to Josh Soref for these fixes.
https://github.com/jsoref
Resolves https://github.com/erthink/libmdbx/pull/118 .
Change-Id: I4e09347da5c9d7a77cdd918a3b15284371440076
2020-09-25 01:01:25 +03:00
Leonid Yuriev
d9daf2944d
mdbx: add env_open_for_recovery() (squashed).
...
Change-Id: I0151b21610def433745c33d1f6e0b66ce655d1a9
2020-09-19 01:48:24 +03:00
Leonid Yuriev
10b170c6cd
mdbx: add mdbx_cursor_create() and mdbx_cursor_bind().
...
Change-Id: I223de3cca7865d58f17a59ab27ec6be730e04a90
2020-09-15 02:05:25 +03:00
Leonid Yuriev
cacc4aa829
mdbx++: changes after codereview-1 (part 2 of 2).
...
Change-Id: I8e1ca134bb8c5d447895f116247dfd12fa6871f0
2020-09-14 21:19:56 +03:00
Leonid Yuriev
17d9ed31f9
mdbx: support for building by GCC 4.8
...
Change-Id: I4ad5c5be60233ae68936e0cbca1a0f01ec786bad
2020-09-13 21:22:41 +03:00
Leonid Yuriev
6c70a7fe11
mdbx++: enables C++ API for amalgamated source code.
...
Change-Id: Ie73f32ee6b9a565eee69fa7267798a0fd67db4b0
2020-09-13 21:22:41 +03:00
Leonid Yuriev
cd4caeb03d
mdbx: add mdbx_panic() to C API.
...
Change-Id: I009a7889311b57ae2210822a8087889f900919f8
2020-09-10 15:37:59 +03:00
Leonid Yuriev
58bcfb006e
mdbx: add mdbx_printf_args() macro.
...
Change-Id: I7fca72f8cc912d8644ecf149b755c78fb3cc7e23
2020-09-10 15:35:43 +03:00
Leonid Yuriev
9249297d31
mdbx: fix MSVC compiler version requirements.
...
Change-Id: Iabf7ab571ca887bd7995ae6293d3c70bb85a947b
2020-09-07 12:38:08 +03:00
Leonid Yuriev
ab9f47a5fe
mdbx: fix MSVC compiler version requirements.
...
Change-Id: Iabf7ab571ca887bd7995ae6293d3c70bb85a947b
2020-09-05 12:16:00 +03:00
Leonid Yuriev
6d7ec5a257
mdbx: enable non-debug logging in non-debug builds.
...
Change-Id: I295de5ef6369a55500b023abc3dcb26f5071c2da
2020-09-05 01:57:02 +03:00
Leonid Yuriev
b1877d08ae
mdbx: rework mdbx_chk & tree-traversal.
...
Change-Id: Idc131539426fe0cbb97a105cff2d0a12b1496bfe
2020-09-05 01:57:02 +03:00
Leonid Yuriev
6e339fc849
mdbx: add bad_page().
...
Change-Id: I5233e4a701ee11fd59d7083576f40f7df3068ddd
2020-09-05 01:57:02 +03:00
Leonid Yuriev
cd4f732a87
mdbx: drop internal unused fields.
...
Change-Id: I634d3e0695f300df79129a15da752a23b277a0ce
2020-09-05 00:55:00 +03:00
Leonid Yuriev
33b1cf2931
mdbx++: Initial C++ API (some extra methods are not implemented).
...
Change-Id: I0478d0c94dcd12b52916e87815e5731817407c3c
2020-09-05 00:26:06 +03:00
Leonid Yuriev
0a75417d5f
mdbx: add pure- & const-function attributes to C API.
...
Change-Id: Ie4d1742f3d4717a0cd1fd5677b9b1ae641193d45
2020-08-23 13:29:44 +03:00
Leonid Yuriev
87de3fc25f
mdbx: add MDBX_TXN_RDONLY_PREPARE.
...
Change-Id: I95647d1679b69d1e97514a45f20d7373174244d5
2020-08-06 01:48:56 +03:00
Leonid Yuriev
1e7a1da14e
mdbx: separate transaction flags.
...
Change-Id: Ib9a0f6946e1ecf35059e2dccc91319ae130c9f9b
2020-08-06 01:48:56 +03:00
Leonid Yuriev
5e43ee61a2
mdbx: drop/deprecate MDBX_MAPASYNC.
...
Change-Id: I472f97f568a32325eb056c8ee4d2f2350a473bda
2020-08-06 01:48:56 +03:00
Leonid Yuriev
135bead730
mdbx: disable warning C4204 for MSVC.
...
Change-Id: Idf7246f5ee349294cea1ed15d69daa49e4dddedb
2020-07-31 01:33:16 +03:00
Leonid Yuriev
7ce33be933
mdbx: fix zero-length arrays for C++.
...
Change-Id: I24ee4b34064f1face40d63861fb2f8982b922f7d
2020-07-31 01:33:16 +03:00
Leonid Yuriev
a902538e34
mdbx: more Doxygen tags (almost done).
...
Change-Id: I696e717e37a905f68af059c51f9df327c257332e
2020-07-24 22:49:21 +03:00
Leonid Yuriev
9720ed39f5
mdbx: using enum
instead of #define for flags/modes.
...
Resolve https://github.com/erthink/libmdbx/issues/108
Change-Id: I45897300375d2b5b9361aaba81dadcf9801fe3cf
2020-07-08 02:26:46 +03:00
Leonid Yuriev
2e0d2e65af
mdbx: fix minor typos.
2020-07-07 23:16:43 +03:00
Leonid Yuriev
fab6ddee14
mdbx: add MDBX_DEPRECATED macro.
...
Change-Id: I87e14b37a6d152fa1f69f4a74e16244870dedb0f
2020-07-07 19:33:17 +03:00
Leonid Yuriev
5dbb0b4cfe
mdbx: rename internal flags & fields for clarity.
...
Change-Id: I79d6d8e88b0b4c30cbb8a464ca17f07dc2ab44c6
2020-07-06 14:35:41 +03:00
Leonid Yuriev
e008f3132d
mdbx: support for huge transactions (MDBX_HUGE_TRANSACTIONS option).
...
Change-Id: I5d6cce6a7fb816add8cb4c066cc50f31cdebf9d5
2020-06-13 03:06:20 +03:00
Leonid Yuriev
5e2067decd
mdbx-tools: use MDBX_ACCEDE to open DBI with custom comparators.
2020-05-15 22:03:29 +03:00
Leonid Yuriev
8f31aad0fb
mdbx: use MAX_TXN internally (cosmetics).
...
Change-Id: Ic8171dbfa8bb32272e46e939223316f6182d3a7a
2020-05-15 18:13:10 +03:00
Leonid Yuriev
c6edd6fb91
mdbx: exclude MDBX_NOSUBDIR from persistent flags.
2020-05-15 11:30:35 +03:00
Leonid Yuriev
57d76d1f7a
mdbx: checking the order of keys on all pages during the audit (squashed).
2020-05-15 11:29:23 +03:00
Leonid Yuriev
d986d09b7b
mdbx: rework min/max length checking for keys & values (squashed).
2020-05-15 08:59:03 +03:00
Leonid Yuriev
a238179c23
mdbx: rename/reorganize internal fields for clarity.
...
Change-Id: I9b23a8ca271f30ebedda9cd8d21094b4797f8bb3
2020-05-09 20:00:31 +03:00
Leonid Yuriev
86dad2d727
mdbx: drop obsolete/unused mn_hi & mn_lo.
...
Change-Id: Ie0099c5afa66ccb679b124f3feb095a364519edc
2020-05-09 03:25:20 +03:00
Leonid Yuriev
5765d92ac7
mdbx: return MDBX_EBADSIGN when mdbx_env_close() called concurrently from several threads.
...
Change-Id: I03a8c87bc51eefc5236baa52cee8b12a9f8aa0e2
2020-04-20 17:00:41 +03:00
Leonid Yuriev
971f924c44
mdbx-build: rearrange source files, rework CMakeLists.txt and refine GNUMakefile (squashed).
...
Change-Id: Id73d346695011dab2f670bb9e6293a1e5a1835ca
2020-04-17 00:37:57 +03:00