Commit Graph

2709 Commits

Author SHA1 Message Date
Leonid Yuriev
966d7027a3 mdbx: minor fix bad_page() debug output.
Change-Id: I14531fdceaad054ad8c45bf9042fee73de1f9a36
2021-01-19 23:53:16 +03:00
Leonid Yuriev
dfc92d9f96 mdbx: minor fix mdbx_page_new() debug output.
Change-Id: If60f972cc3271ca91feea923fb4f4be48d488b22
2021-01-19 23:53:16 +03:00
Leonid Yuriev
ac0f4e14a8 mdbx: minor fix mdbx_page_new() debug output.
Change-Id: I2f386ec6276cab404607b5c3a79d8028d73dad62
2021-01-19 23:53:16 +03:00
Leonid Yuriev
ca597f4314 mdbx: fix mdbx_page_flush() for possibility of memleack.
Change-Id: Ieab0c98fcd1020d49cce73234125ceb11a8f0b64
2021-01-19 23:53:16 +03:00
Leonid Yuriev
c1fef9b51d mdbx: fix mdbx_update_gc() for retired page list change case.
Change-Id: Ic454262edcda8881182a15d6a521b90990e5551d
2021-01-19 23:53:16 +03:00
Leonid Yuriev
b8bb4b4cc4 mdbx: fix propagation child txn DBI-state to parent.
Change-Id: I7d92fa99131a937af1a1a75b38af57bc6787ab37
2021-01-19 23:53:16 +03:00
Leonid Yuriev
4425fb0b83 mdbx: minor refine flags-reset inside mdbx_page_flush().
This produces little bit less code for most architectures.

Change-Id: I0440ec7b465ae2f12a8b09b0226f2c42bc52f7de
2021-01-19 23:53:16 +03:00
Leonid Yuriev
5bb254e629 mdbx: allow fastpath-commit for pure nested txns with parent-spilled pages.
Change-Id: I471fd5e057c323e3701158761631e0a9999bf54a
2021-01-19 23:53:16 +03:00
Leonid Yuriev
8fce97dca9 mdbx: fix mdbx_cursors_eot().
Change-Id: I6021ff019f25110db96f9ef351d31a1f48b76c18
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
d64b81c673 mdbx: remove senseless assertions from mdbx_refund_loose().
Change-Id: I028ae6bafb9358b61287fc0201c246baf160ca03
2021-01-19 23:53:16 +03:00
Leonid Yuriev
0ab263b329 mdbx: purge deleted spilled pagenums on refund.
Change-Id: I325fbad82cbecb71c35dd1edd1a2abccb8108541
2021-01-19 23:53:16 +03:00
Leonid Yuriev
7bf147d8c2 mdbx: fix assertion inside mdbx_txn_commit_ex() for nested spilled txn.
Change-Id: I54b37ea1b9591bdec9d8bd16d0f57280a1f9ee77
2021-01-19 23:53:16 +03:00
Leonid Yuriev
6ef7b2f588 mdbx: fix assertion inside mdbx_txn_begin_ex() for nested txn with spilled parent.
Change-Id: Ie1f3cd3df6beb296a7bbdc72b39c1c4cb9105083
2021-01-19 23:53:16 +03:00
Leonid Yuriev
51ec5c442b mdbx-make: fix missing .gz suffix when check target called from stochastic script.
Change-Id: I32892df03d59848737677f59d50e94a1a98301ad
2021-01-19 23:53:16 +03:00
Leonid Yuriev
f0d79df9b9 mdbx: fix mdbx_page_flush().
Change-Id: I467c2367f2e99ae50996d0859ae22f70c9649a2d
2021-01-19 23:53:16 +03:00
Leonid Yuriev
05958a708e mdbx: fix minor/potential mem-page leak inside mdbx_page_unspill().
Change-Id: I4398a4d81eda494e4de9d62d81e3936c6357b744
2021-01-19 23:53:16 +03:00
Leonid Yuriev
21fbc36311 mdbx: minor refine mdbx_page_retire().
Change-Id: I29d20ed47f56e17dde8c9417bfa1ec95302c1966
2021-01-19 23:53:16 +03:00
Leonid Yuriev
cea29fe485 mdbx: fix assertion inside mdbx_page_retire().
Change-Id: I5d8f92b9fde1c961252757ea508403b5f51e7646
2021-01-19 23:53:16 +03:00
Leonid Yuriev
fe386a66df mdbx: minor refine mdbx_page_unspill().
Change-Id: I20bbd4c502a2258b945996fa1cf761eab7f88a80
2021-01-19 23:53:16 +03:00
Leonid Yuriev
92527a5206 mdbx: rename mdbx_page_spill to mdbx_cursor_spill().
Change-Id: I71628951d29ea39055b920a76521a19cb10ac8da
2021-01-19 23:53:16 +03:00
Leonid Yuriev
266bb70b7d mdbx: add debug to mdbx_kill_page().
Change-Id: Ifbb3164989a19d8ea48288b4eda1a8bcf31790ff
2021-01-19 23:53:16 +03:00
Leonid Yuriev
56758372cf mdbx: drop unused mdbx_audit().
Change-Id: I6d31c6ad83c058892319da6bbf38506b3f55085f
2021-01-19 23:53:16 +03:00
Leonid Yuriev
1314b29557 mdbx: add const for bsearch functions.
Change-Id: Ie63eafa145bc8a63ae56b2693aaaf69bd21893aa
2021-01-19 23:53:16 +03:00
Leonid Yuriev
ef7814c018 mdbx: clean zero item of DPL-list.
Change-Id: I7c60f3996783d97cee7cf2f0f9a7b856f4272641
2021-01-19 23:53:16 +03:00
Leonid Yuriev
d50fff8410 mdbx: minor refine mdbx_page_check().
Change-Id: I325c20fe042635a0641cc24f5661408f3476139b
2021-01-19 23:53:16 +03:00
Leonid Yuriev
44089b03df mdbx: minor refine mdbx_page_get().
Change-Id: Ie0ca17883ed88e4d9addf8b90061d25a80d77022
2021-01-19 23:53:16 +03:00
Leonid Yuriev
a906569c58 mdbx: merge branch 'master' into devel-rebase.
Change-Id: I96d944f283029b9c60e45683ee66b4564273b407
2021-01-19 23:51:52 +03:00
Leonid Yuriev
b98895b8c7 mdbx: fix unaligned access to bootid on the meta-pages.
Assume this fixes https://github.com/erthink/libmdbx/issues/153

Change-Id: I062c1bd99795a7b875d1cf60658790c1071a6775
2021-01-18 14:27:58 +03:00
Leonid Yuriev
e766df658c mdbx-backport: 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
2021-01-18 14:08:49 +03:00
Jens Alfke
adc7208169 mdbx-make: Added DLLs and dSYMs to clean & gitignore.
- Added file types .dll, .dylib and .dSYM to .gitignore
- Added above to the file types deleted by `make clean`

Resolves https://github.com/erthink/libmdbx/issues/151
2021-01-07 02:01:45 +03:00
byronhe
3a441d6d3a Update mdbx.h 2021-01-04 17:49:25 +03:00
Leonid Yuriev
082df3a573 mdbx: refine MDBX_opt_* descriptions and defaults.
Change-Id: I99ddf530d5683b755bc8bab1ea1098b0cc00b181
2020-12-17 22:03:14 +03:00
Leonid Yuriev
697fce7ebc mdbx: rename MDBX_END_PURE_COMMIT (cosmetics).
Change-Id: Ia3bdeca5989c841c0dc969e22981044fb334bf32
2020-12-17 22:03:14 +03:00
Leonid Yuriev
70e76bcb4d mdbx: merge branch 'master' into devel.
Change-Id: Idc8838922081cbc8ebe6c564555e4d304b529588
2020-12-17 21:52:35 +03:00
Leonid Yuriev
1ebc1e7c49 mdbx: update ChangeLog.
Change-Id: Ib53b3180b2b8e5437eec649aa010bdd6779d41c9
2020-12-17 17:42:35 +03:00
Leonid Yuriev
760f1654c2 mdbx-test: minor extension for jitter test case.
Trivial test for https://github.com/erthink/libmdbx/issues/146.

Change-Id: If5b365ebedf8609c9ec12569d5e5173799379195
2020-12-17 17:41:24 +03:00
Leonid Yuriev
d77af0bc1f mdbx: more checks against the use renewed (re-created or re-opened) DBI-handles.
More for https://github.com/erthink/libmdbx/issues/146

Change-Id: I09e40598aca18e7ebd9798dc3be8675de3f8d976
2020-12-17 10:36:05 +03:00
Leonid Yuriev
735da5fedd mdbx: auto-shrink env's DBI table.
Change-Id: I9f423dab41863119a4491491e0ecd0a4aee42a82
2020-12-17 01:57:06 +03:00
Leonid Yuriev
cda64ca663 mdbx: rework open/import/export of DBI-handles for robustness
Resolve https://github.com/erthink/libmdbx/issues/146

Change-Id: Idd18dc0d038eeba47668983ecf4ff46eabd16de5
2020-12-17 01:57:02 +03:00
Leonid Yuriev
166ed1c7d4 mdbx: refine prev commit (avoids SIGSEGV but assertion failure).
More related to https://github.com/erthink/libmdbx/issues/146

Change-Id: Ie5277a8cc56421d20a7c9aad83724991b2efdc2d
2020-12-15 15:43:19 +03:00
Leonid Yuriev
3758e7697e mdbx: more checks inside mdbx_cursor_close().
Related to https://github.com/erthink/libmdbx/issues/146

Change-Id: I7b90a0e515aa6320b0e89ec52fe01bc0be126071
2020-12-15 15:07:42 +03:00
Leonid Yuriev
315ef41455 mdbx: use MDBX_PGL_LIMIT for DPL as a soft-limit and options.dp_limit as spilling-pressure to avoid false-positive MDBX_TXN_FULL.
Change-Id: I0caae71d044cefa2f36286c2ae9fe14e356a6b51
2020-12-06 14:42:13 +03:00
Leonid Yuriev
c1210d7c73 mdbx: refine mdbx_page_alloc() to avoid MDBX_TXN_FULL.
More for https://github.com/erthink/libmdbx/issues/123

Change-Id: I527b7e9507f4c2aa565f1567924cfb1c477966dd
2020-12-06 14:39:19 +03:00
Leonid Yuriev
a4df0acb00 mdbx: more logging for FD < STDERR_FILENO.
More for https://github.com/erthink/libmdbx/issues/144

Change-Id: I8dcd3cab8a39b16a1836c88ec92b30d6b0de8b51
2020-12-06 14:35:38 +03:00
Leonid Yuriev
c4944a58d5 mdbx: avoid spelling errors (cosmetics).
Change-Id: Ibf14e003ba740ba757b5403e92fd220e68930ce4
2020-12-05 22:51:45 +03:00
Leonid Yuriev
d116e7235a mdbx-posix: safeguard for DB corruption in case FD <= STDERR_FILENO.
Resolve https://github.com/erthink/libmdbx/issues/144

Change-Id: Ic3467338d494b021fa0d1863c8227976d0a2bcd5
2020-12-05 22:51:45 +03:00
Leonid Yuriev
3e7459b428 mdbx-windows: fix mdbx_realloc() for nullptr and MDBX_AVOID_CRT=ON.
Change-Id: I129221186d65254da5b1d84747e5c59d53864b70
2020-12-05 09:45:03 +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
12ee5e6cac mdbx: minor refine mdbx_page_flush().
More for https://github.com/erthink/libmdbx/issues/132.

Change-Id: I703e1359d859b8901fcbdf57211f7805cd6d5ff1
2020-12-04 15:38:26 +03:00