Leonid Yuriev
ed6863851e
mdbx: crutch for iOS.
...
Workaround for https://github.com/erthink/libmdbx/issues/92
Change-Id: Id8ed900d1310212ae0edd4bf6ab11bdba9c106a1
2020-04-07 17:35:49 +03:00
Leonid Yuriev
921f43da6f
mdbx: fix ceiling/flooring madvise-edge inside mdbx_sync_locked().
...
Fixes https://github.com/erthink/libmdbx/issues/91
Change-Id: I17da72d9a53a2c7453d81488bd3297063de0b7d1
2020-04-07 03:54:48 +03:00
Leonid Yuriev
94e58d7acc
mdbx: more explicit casting to size_t (paranoia).
...
Change-Id: I1c65943cdcdd77cc12bc27d9ced19765ea7911bb
2020-04-07 03:48:23 +03:00
Leonid Yuriev
bf0cff9a8a
mdbx: add & use floor_powerof2().
...
Change-Id: Ib5be7d5a68dc7944e208d75094050383ccdfa6d0
2020-04-07 03:48:20 +03:00
Leonid Yuriev
a846fb0d21
mdbx: rename roundup_powerof2() to ceil_powerof2().
...
Change-Id: Ie22f10ffa6637ef74f2c705fad5fc45a8d19d22e
2020-04-07 03:45:11 +03:00
Leonid Yuriev
4ad1c2daed
mdbx: minor fix/workaround to avoid GCC 10.x pedantic warnings.
...
Change-Id: If67c1ae593ad2c39130054475c37321dca761f5b
2020-04-07 01:54:58 +03:00
Leo Yuriev
3f7c9846e7
mdbx: use uintptr_t instead of size_t for pointer-wide values and types.
...
More for https://github.com/erthink/libmdbx/issues/88
Change-Id: Ic625096df3c09d0dd578c7b79aa302be35480699
2020-04-04 16:52:44 +03:00
Leo Yuriev
75de63dff1
mdbx: refine type-casting inside mdbx_thread_self() to avoid warning.
...
2 of 2 for https://github.com/erthink/libmdbx/issues/88
Change-Id: Ic4994141d23a5417b18f6b03a3e4038859fb9210
2020-04-04 16:52:42 +03:00
Leo Yuriev
089d7212e7
mdbx: fix mdbx_build_info for undefined flags case.
...
1 of 2 for https://github.com/erthink/libmdbx/issues/88
Change-Id: I079b329abe8f20793dc78c90ea55f874693dde43
2020-04-04 16:52:39 +03:00
Leo Yuriev
d329ea1fe0
mdbx-tools: fix txnid_t casting inside mdbx_stat.
...
Change-Id: I69799d8caca3e6692a433b2e62e7b2867b152b00
2020-04-04 16:01:05 +03:00
Leonid Yuriev
8f5ae79b51
mdbx: bump version to 0.7.x
...
Change-Id: I6cb06fbd7119eed086b54a9760db1e0edf5de07b
2020-03-18 17:19:12 +03:00
Leonid Yuriev
251d34d6e6
mdbx-doc: more for custom comparators.
...
Change-Id: I3326c5bdedbbdb01b1865bff68aa7ba8bc7056cc
2020-03-02 13:50:33 +03:00
Leo Yuriev
76e29c21f1
mdbx: merge branch 'devel' (crutches for Wine).
...
Change-Id: I1779bc6987449e403216584cdd2846e910f34c8a
2020-02-28 19:05:47 +03:00
Leo Yuriev
5072b45026
mdbx: rename MDBX_MAP_RESIZED to MDBX_UNABLE_EXTEND_MAPSIZE.
...
Change-Id: I22fbdb4f08fd7a6ae37da42e6827677ae8a8337b
2020-02-28 16:40:56 +03:00
Leo Yuriev
63449a44c5
mdbx-cmake: #if/#endif instead of cmake-conditions for posix/windows sources.
...
Change-Id: Ic95bd3ba345160cf1d68c79f11d6560d4c41cb2b
2020-02-28 15:51:12 +03:00
Leonid Yuriev
ecffc831fa
mdbx-tools: avoids extra error messages "bad txn" from mdbx_chk when DB is corrupted.
...
Change-Id: I6b92aced83bcf7e0c8e5c7108ddcf60714c9b30c
2020-02-27 16:04:00 +03:00
Leonid Yuriev
6248b67f75
mdbx-windows: more for running under Wine.
...
Wine unable create mapped-view large tran secton size.
More for https://github.com/erthink/libmdbx/issues/83
Change-Id: I93e98d58a827c785f8257cd9cac387a333e59621
2020-02-24 20:46:36 +03:00
Leonid Yuriev
fbf55e17cb
mdbx-windows: one more workaround for Wine.
...
SetFileInformationByHandle() is not implemented by Wine.
Change-Id: I61783c8d173397094cd6cbad7efc9d7aac57b470
002c:Call KERNEL32.SetFileInformationByHandle(00000060,00000006,0022f890,00000008) ret=127dd1b2
002c:fixme:file:SetFileInformationByHandle 0000000000000060, 6, 000000000022F890, 8
002c:Ret KERNEL32.SetFileInformationByHandle() retval=00000000 ret=127dd1b2
Related to https://github.com/erthink/libmdbx/issues/83
2020-02-22 20:02:17 +03:00
Leonid Yuriev
289f2896d0
mdbx-windows: more for Wine.
...
Related to https://github.com/erthink/libmdbx/issues/83 .
UnlockFile() cold return ERROR_LOCK_VIOLATION when file not locked, instead of ERROR_NOT_LOCKED.
Current versions of Wine seem to work correctly.
Change-Id: Ibc5bd4352184efc7f88705e7ae04d6656286a96e
2020-02-21 19:58:32 +03:00
Leonid Yuriev
4fed2d9fc0
mdbx-windows: minor workaround for MSVC "unresolved external symbol __except1 ..."
...
Workaround for MSVC error LNK2019: unresolved external symbol __except1 referenced in function __ftol3_except.
2020-02-19 16:31:25 +03:00
Leo Yuriev
9aa816dc73
mdbx-windows: using RegGetValueA() instead of wchar_t version.
...
Change-Id: I0848eaf2083985ae27fec605358329830b0733c2
2020-02-19 16:00:40 +03:00
Leo Yuriev
f750086bc1
mdbx-windows: rework workaround for Wine.
...
Resolves https://github.com/erthink/libmdbx/issues/83
in accordance with https://bugs.winehq.org/show_bug.cgi?id=48620
Change-Id: Ieb4385efdcd86c865184a783363cf6e90da14f61
2020-02-18 22:51:34 +03:00
Leonid Yuriev
bd3f234bce
mdbx: update github repo address.
...
Change-Id: Ifa8bf0e09b297ba6f495dd8e04e5c67f6626d9cb
2020-02-18 02:22:47 +03:00
Leo Yuriev
60a6560a3b
mdbx: workaround for NtExtendSection() on Wine.
...
This fixes https://github.com/erthink/libmdbx/issues/83
Change-Id: I8e00aa91c86348fad9dbe4285143671d9cb3f802
2020-02-17 22:55:17 +03:00
Leo Yuriev
d1173a1596
mdbx: drop unused WindowsNT API prototypes.
...
Change-Id: Ic929646653d0576671d6150a698e892d2145ae30
2020-02-17 19:44:05 +03:00
Leonid Yuriev
2356f3281b
mdbx: use underscores for GNU-attributes.
...
Change-Id: Iefd371dd91da1db8ee86554208536b3004535317
2020-02-17 14:01:11 +03:00
Leonid Yuriev
cd0d84dbb6
mdbx: fix error message typo.
...
Change-Id: I25db309ff4fb063893c7c39d623e62eaceb8b60f
2020-02-03 23:35:43 +03:00
Leonid Yuriev
8214d674be
mdbx: refine SEARCH_IMPL macro.
...
Change-Id: I975e480c047b88e0200aaf889334e8b83ab760ad
2020-02-03 18:13:17 +03:00
Leonid Yuriev
62a39d84b3
mdbx: fix aligned_alloc() usage.
2020-02-02 20:49:51 +03:00
Leonid Yuriev
6009bac1ed
mdbx: move is_powerof2() and roundup_powerof2() into header.
2020-02-02 20:41:04 +03:00
Leonid Yuriev
e475db7ade
mdbx: add MDBX_DBG_LEGACY_OVERLAP.
...
Change-Id: I7aecb925b553587efd6698dc3d52682ca98aa950
2020-02-02 15:07:04 +03:00
Leonid Yuriev
49d9779c84
mdbx: remove obsolete ASAN-related comment.
...
Corresponding drawback was fixed by 8c7cdfdc79e1ad0a7786d8039a52bffde673f7a5
Change-Id: I43ccf508377dc4b0bf5de6245e88c58dde0fc63e
2020-02-02 02:46:41 +03:00
Leonid Yuriev
a594f79e5f
mdbx: refine/clarify error messages.
...
Change-Id: If2a38bdfb4a9fce176acb87fa452709bcfc5c972
2020-02-02 02:46:41 +03:00
Leonid Yuriev
17fe5f106b
mdbx: check read/write txn overlapping for the same thread (MDBX_TXN_OVERLAPPING).
...
Change-Id: If3488df96bd1903d5e4ca0a1fea504075dbd4a20
2020-02-02 02:46:41 +03:00
Leonid Yuriev
db27654330
mdbx: rename MDBX_LAST_LMDB_ERRCODE and fix description.
...
Change-Id: I9a855871ae8821d0d10472c48b5467fd507c01a5
2020-02-02 02:46:41 +03:00
Leonid Yuriev
1cbad5bd3f
mdbx: don't store thread-id into reader lock-slot in MDBX_NOTLS mode.
...
Change-Id: I8453565a8c0a7c56b6dbd383c31ff5be828c8679
2020-02-01 23:08:07 +03:00
Leonid Yuriev
08753b46a1
mdbx: cleanup tabs (cosmetics).
...
Change-Id: If941ea89d844f98f274da4ddfc3f2ae97986eeb7
2020-02-01 20:44:29 +03:00
Leonid Yuriev
fb1d600597
mdbx: speedup debug/checked build.
...
This resolves https://github.com/leo-yuriev/libmdbx/issues/80
Change-Id: I20596f87db17ce01379dae5f58f4c2b158a04a4a
2020-01-29 03:29:42 +03:00
Leonid Yuriev
c1ad86c368
mdbx: fixes for modern Coverity.
...
This resolves https://github.com/leo-yuriev/libmdbx/issues/81
Change-Id: Id501bf49055b54240da14723aef0115fc3a27672
2020-01-28 19:37:56 +03:00
Leonid Yuriev
7ea1a4e0e8
mdbx: fix key_from_jsonInteger() for MSVC.
...
Change-Id: I3fc6a6da57707750cb2e8429bbaf10ff1de2dde2
2020-01-28 01:47:50 +03:00
Leonid Yuriev
2c08ec21fd
mdbx: fix compatibility (use zero for invalid DBI).
...
Change-Id: I4ab6430eb96d97991cbd0c151dfd98a9930805d2
2020-01-27 03:00:13 +03:00
Leonid Yuriev
d159a8252d
mdbx: refine network-sorting.
...
Change-Id: I086626c3da05b11362612d87eae23371f67ea1b0
2020-01-27 00:47:18 +03:00
Leonid Yuriev
308548e226
mdbx: minor refine/speedup mdbx_page_get().
...
Change-Id: Ia11a76f0255db1a56948438cdc333ebd67d88193
2020-01-26 19:07:00 +03:00
Leonid Yuriev
a8c5daf46a
mdbx: minor refine/speedup mdbx_node_search().
...
Change-Id: Ie3dd42de25e37bff177018cd15108b97cfcb049c
2020-01-26 18:00:35 +03:00
Leonid Yuriev
2ce9ace4d3
mdbx: documenting and checking key and value alignment for MDBX_INTEGERKEY and MDBX_INTEGERDUP.
...
This resolves https://github.com/leo-yuriev/libmdbx/issues/79 .
Change-Id: I819a6eca3018361e5896d5ccce7e4c0ca57c8b38
2020-01-26 14:54:40 +03:00
Leonid Yuriev
1ee1b269e6
mdbx: minor optimization around memcpy().
...
Change-Id: Id0dd4ac693a4ddb6294bdb0f2fc5d2aec69d0efd
2020-01-26 14:44:50 +03:00
Leonid Yuriev
ebcbcbfe31
mdbx: avoud int64-to-double conversion key_from_jsonInteger().
...
More for https://github.com/leo-yuriev/libmdbx/issues/76
This is expected to be a workaround for the MSVC2019 bug
"MSVCRT.lib(ftol3.obj) : error LNK2001: unresolved external symbol __except1".
https://ci.appveyor.com/project/leo-yuriev/libmdbx/builds/30273569/job/lurrftum1nkbu5a3#L109
Change-Id: Ie6da02b14d0b973c7172af063caf4fdc44bf89ac
2020-01-22 19:41:01 +03:00
Leonid Yuriev
b77f4faadd
mdbx: fix major typo in prev commit.
...
More for https://github.com/leo-yuriev/libmdbx/issues/76
Change-Id: I9a3d1adf1467a542b36330978d53cc15f4afbbdb
2020-01-22 03:51:12 +03:00
Leonid Yuriev
bf28856ac5
mdbx: add key-making functions.
...
Related to https://github.com/leo-yuriev/libmdbx/issues/76
Change-Id: I1edc8efd323af9adb53e6c2155e2ea39a1e575f4
2020-01-22 03:43:09 +03:00
Leonid Yuriev
700f3514b3
mdbx: bump version to 0.6.x
...
Change-Id: I925ab0aaefb1a8f9860925c2e8e7c81015428b2e
2020-01-21 00:17:55 +03:00
Leonid Yuriev
2d334185cb
mdbx-tools: rework/fix mdbx_load for custom comparators.
...
Change-Id: I9bc15fb878d1586839768f97567806208bfcc5b8
2020-01-21 00:17:55 +03:00
Leonid Yuriev
2c1d3a3fda
mdbx: refine dbi_open_ex().
...
Change-Id: I32bc1c6609e14ba90b2f4eaf9b8b11ea06f2eb8b
2020-01-21 00:17:55 +03:00
Leonid Yuriev
7d880a37dd
mdbx: refine internal sort.
...
Change-Id: If07d9f6b7a7976e5e048eb1b8b7e0b65c4ed3fdd
2020-01-21 00:17:55 +03:00
Leonid Yuriev
d12b546a7d
mdbx: fix MDBX_APPEND check inside cursor_put().
...
Change-Id: If21dedbd72b3a038252b9dc10c5c6543328362e7
2020-01-21 00:17:55 +03:00
Leonid Yuriev
6184024a80
mdbx: more __has_builtin().
...
Change-Id: Ie23e170e12d96ad47bf2f25c7dde974673109b54
2020-01-21 00:17:55 +03:00
Leonid Yuriev
2bfcbe980e
mdbx: refine/fix dbi_bind().
...
Change-Id: Ic4245c349870198f79efd537cf12d9bdf691b7ca
2020-01-21 00:17:55 +03:00
Leonid Yuriev
0710b07d7c
mdbx: refine/speedup dpl_search().
...
Change-Id: I712e22ea69f23f61c92be976069f09a85831d086
2020-01-21 00:17:55 +03:00
Leonid Yuriev
7c894f0542
mdbx: HNY!
...
Change-Id: Idbd21263408f87ac2715675c9f7ccc6c44d41c9a
2020-01-21 00:17:55 +03:00
Leonid Yuriev
c05875befd
mdbx: refine/speedup internal sort (10-30% faster).
...
- more friendly for Russian Elbrus's predicates (512-bit wide VLIW).
- more CMOV-friendly for x86 (nicely optimized by gcc-9.x and clang-8.x).
- use bitonic sort for small chunks.
- less branches in the outer loop.
Change-Id: I0510f5a0b2c39a19caa9e829a20e34dfbd160a01
2020-01-21 00:17:54 +03:00
Leonid Yuriev
995a26cf19
mdbx-windws: refine/fix handling STATUS_CONFLICTING_ADDRESSES.
...
Change-Id: I501acb2d5d653c74ab210907dd955d7167956af8
2020-01-06 01:23:11 +03:00
Leonid Yuriev
f282ae45e0
mdbx: more unlikely (minor).
...
Change-Id: I9052d89d4b297615af199a0e2f468cda1482297a
2020-01-05 00:49:16 +03:00
Leonid Yuriev
9de65acf3e
mdbx: fix env_set_geometry() for large pagesize.
...
Change-Id: Ide12e705abf76184f839d1670b0ca1c1e1c64da5
2020-01-05 00:49:16 +03:00
Leonid Yuriev
6fa79d49b4
mdbx: fix MDBX_RESULT_TRUE from page_alloc().
...
Change-Id: Ib285e98f967b9aefac8facfba31618a80c5e8129
2019-12-31 20:44:40 +03:00
Leonid Yuriev
66f3c0a77e
mdbx: merge branch 'refine' into devel.
...
Change-Id: I3f6a787c66b4e7fca3c43d72e4b4083782cc94c4
2019-12-31 19:39:22 +03:00
Leonid Yuriev
5eafc6e738
mdbx: minor refine txn_commit().
...
Re-assign `rc` variable to release register from allocation.
Change-Id: Ibafd70efd53591d3bf190417e1b2f3b20299e7d2
2019-12-31 19:38:41 +03:00
Leonid Yuriev
7d1eff5116
mdbx: minor refine cursor_put().
...
Use `rc2` variable to simplify register(s) allocation.
Change-Id: Ie47210a4b494e9aeaa8492830cfbcbbde02b485c
2019-12-31 19:38:41 +03:00
Leonid Yuriev
36c7d7a435
mdbx: minor refine page_alloc (MIN_TXNID).
...
Change-Id: Iac20f79280e5b464b39f7ac5b1efe01585c5bf02
2019-12-31 19:38:41 +03:00
Leonid Yuriev
03a68e87ba
mdbx: fix commit typo (minor).
...
Change-Id: I3e6564eb9a1404c3aaffb7dd9143dc64e7d822af
2019-12-31 19:38:41 +03:00
Leonid Yuriev
8c7cdfdc79
mdbx: fix ASAN issues (minor).
...
This resolves https://github.com/leo-yuriev/libmdbx/issues/73
Change-Id: Ifb59f5ba66321bb362b81085e0f25a82a2d76d5f
2019-12-29 01:19:31 +03:00
Leonid Yuriev
c7ae4ace9d
mdbx: fix assertion for MDBX_NOTLS option.
...
This fixes https://github.com/leo-yuriev/libmdbx/issues/72
Change-Id: I9e2b02e33e7e702eb093c0c1049c54b76d8d23b5
2019-12-28 02:17:38 +03:00
Leonid Yuriev
7b6880bdc9
mdbx-windows: treat STATUS_INVALID_ADDRESS same as STATUS_CONFLICTING_ADDRESSES for some cases.
...
Change-Id: I542c7f4010f880428e3c7b10413e4f98c4aa7b48
2019-12-25 00:46:01 +03:00
Leonid Yuriev
379a789839
mdbx: minor refine MDBX_MMAP_INCOHERENT_FILE_WRITE.
...
Change-Id: I1e77eccc64b470bf3c7aeb8f6b905b72e818f7a0
2019-12-25 00:46:01 +03:00
Leonid Yuriev
bdb4ccb352
mdbx: copy for txn only used dbiseqs.
...
Change-Id: I6fd2d8598b5e86c0d5b8d7eef535e81525cd14ee
2019-12-25 00:46:01 +03:00
Leonid Yuriev
53d5cb0151
mdbx: rework MADV_DONTNEED threshold.
...
Change-Id: I99058b96e9c54c56d37c6c963b01cf18458d37ba
2019-12-24 18:16:04 +03:00
Leonid Yuriev
f2fd2280e4
mdbx: more for QEMU cross-testing.
...
Change-Id: Iad5e7f977c744b2edf1987d38523ba0e1f6e46ab
2019-12-23 00:02:54 +03:00
Leonid Yuriev
2acaaeb2ff
mdbx-chk: fix - don't check some numbers if btree-walking was disabled.
...
Change-Id: I3e1abb7fa7720ecb3fc22e6b4a9b1b56494fb8a0
2019-12-22 14:01:50 +03:00
Leonid Yuriev
a5fb5887f9
mdbx: minor refine/fix lock-related erro logging.
...
Change-Id: Id507819b6b2b0c1a57ec71bd031c5068cb2098e1
2019-12-21 23:33:12 +03:00
Leonid Yuriev
e3d328621e
mdbx-posix: checking for file removal during LCK-seizing.
...
Change-Id: I7626ceda62fc4dac86323bec4194ae46bc19d9d3
2019-12-21 23:33:12 +03:00
Leonid Yuriev
ccb45730f2
mdbx: use page's mp_txnid for basic integrity checking.
...
Change-Id: I50d6f1251e4fd84e535a708e78dd24d84ec53780
2019-12-21 23:33:12 +03:00
Leonid Yuriev
d11bfef36b
mdbx: aligned page-buffer.
...
Change-Id: Id469c353c47a5a486747bf2c21ee8c003cd2d103
2019-12-21 23:33:12 +03:00
Leonid Yuriev
e70a7f620e
mdbx: clarify field description (minor).
...
Change-Id: Ide20e32b4ee6784a7baf2044f52877afbd9ceff1
2019-12-21 23:33:12 +03:00
Leonid Yuriev
7abd625c05
mdbx-tools: print warning about Windows system limitation.
...
Change-Id: I8a7765bfe604dc2a4016d3e27622d41f93f06b04
2019-12-21 23:33:12 +03:00
Leonid Yuriev
c79879f290
mdbx-tools: update mdbx_stat captions.
...
Change-Id: Ic78f7e5bec97a67e8dc3ce21847dcaa1f66a45f9
2019-12-21 23:33:12 +03:00
Leonid Yuriev
e8686a4170
mdbx-cmake: add MDBX_FORCE_ASSERTIONS.
2019-12-21 23:33:12 +03:00
Leonid Yuriev
78e146692a
mdbx: alter rule for wipe of steady-point.
...
Change-Id: Idac7ffd5e89d282aebcbe7382e20a960d5b39f25
2019-12-21 23:33:12 +03:00
Leonid Yuriev
cddf9ca8a2
mdbx: toggle of readers-refresh after wipe steady-point.
...
Change-Id: I43985fb667b727a8b41dcd5c33e6012160dee16e
2019-12-21 23:33:12 +03:00
Leonid Yuriev
c554b5c45d
mdbx: move toggle of readers-refresh to sync_locked().
...
Change-Id: I99adf32fb39d600a37c4b25f7e8ea49e5bac6cf0
2019-12-21 23:33:12 +03:00
Leonid Yuriev
0350fc41f8
mdbx: clean copy for undo meta.
...
Change-Id: I2abc1d701dc52caa268210489aa27803fd7a2c3b
2019-12-21 23:33:12 +03:00
Leonid Yuriev
edbdb682d5
mdbx: refine page_flush().
...
Change-Id: I8270226e4eae721404dbb56d5d591bceaa4613b9
2019-12-21 23:33:12 +03:00
Leonid Yuriev
7f9502fbfe
mdbx: rename txn_dbi_exists().
...
Change-Id: I3a18d73cb49cfa814f1400743ed889d9c3e979ce
2019-12-21 23:33:12 +03:00
Leonid Yuriev
867c537655
mdbx: refine sync-to-disk (lazy/dsync fds).
...
Change-Id: I4bad81a1a0b5ccbefdc598f58a7d683fa7d8b504
2019-12-21 23:33:12 +03:00
Leonid Yuriev
2db5736554
mdbx: purpose-oriented openfile().
...
Change-Id: I657689dab538af9a27c27f58eeb4e5ca43bdbc38
2019-12-20 03:20:26 +03:00
Leonid Yuriev
13d68a1200
mdbx: rework & clarify backlog for gc-update.
...
Change-Id: I31f2b6919810b894e69af34bfee9a5b7f5a513fc
2019-12-19 01:09:54 +03:00
Leonid Yuriev
b6a00a881e
mdbx: refine page_get().
...
Change-Id: I7399782f891d3c6baebedb918f8beffc509e66df
2019-12-18 03:06:07 +03:00
Leonid Yuriev
996b0fa8d3
mdbx: add/remove __hot attribute for internals.
...
Change-Id: Ia2aa7b81cb3f7342aece720b3cf0bd04f6d8ca64
2019-12-18 03:04:50 +03:00
Leonid Yuriev
83a11c1645
mdbx: more __restrict for pointers.
...
Change-Id: Ic58bf084f0e80f16aa695cddf3dd2c5627f8a836
2019-12-18 03:03:38 +03:00
Leonid Yuriev
66ca7a519e
mdbx: rework MDBX_DBG_DUMP to avoid performance degradation.
...
Change-Id: I556ae61e03fdf7d6798072bbc2583ae5d01cbf9f
2019-12-17 18:02:13 +03:00
Leonid Yuriev
4eccf901ea
mdbx: rename MDBX_NOSYNC to MDBX_SAFE_NOSYNC for clarity.
...
Change-Id: I1d04600832cb7c86c578d72f3d6163ee22d134b7
2019-12-15 15:17:24 +03:00
Leonid Yuriev
a77921dc67
mdbx: more __always_inline as workaround for wrong non-inlining of functions.
...
Change-Id: Id4f44de7a883f2d5fbc00e4c3ed915a8c4f07bfe
2019-12-15 00:57:03 +03:00
Leonid Yuriev
61d2e07cf0
mdbx: fix minor typo.
...
Change-Id: Id82209bfeeb6b6ade00e8aaecc0b9ce4b817e832
2019-12-14 00:57:45 +03:00
Leonid Yuriev
76099d951c
mdbx-windows: interpret ERROR_ACCESS_DENIED from OpenProcess() as 'process exists'.
...
Change-Id: I22e3e3d3d72531e76848793f1e3522d0c1767618
2019-12-13 16:17:31 +03:00
Leonid Yuriev
bf6d09a878
mdbx-windows: use manual-reset events to avoid non-atomic races.
...
Change-Id: I93b9f114c7c1a205dba18dcc363cf4ba8a27d7e0
2019-12-09 10:59:57 +03:00
Leonid Yuriev
041188c5e2
mdbx-windows: don't use FILE_FLAG_NO_BUFFERING for compatibility with small DB-pages.
...
Change-Id: Ib8e51ef0ae713455c52e08447f06baede080f368
2019-12-09 10:55:14 +03:00
Leonid Yuriev
60f4134841
mdbx: disable by-default workaround for obsolete E2K bug.
...
Change-Id: I9d6aaf0154e3c9f03dab7948575f4792a13dc988
2019-12-08 14:56:56 +03:00
Leonid Yuriev
f22c127c44
mdbx-tools: reformat (cosmetic).
...
Change-Id: I077a266e0a646f3283453d429bff87545839fada
2019-12-07 03:08:03 +03:00
Leonid Yuriev
8fed86b368
mdbx: avoid use MREMAP_MAYMOVE for simplification, add TODO.
...
Change-Id: I6991a411fcced941ef76d58ece608e34e4cdb355
2019-12-07 03:06:00 +03:00
Leonid Yuriev
3dccbb25a7
mdbx: minor refine man-files.
2019-12-05 01:43:57 +03:00
Leonid Yuriev
ab5f3bc444
mdbx: remove extra MDBX_SYNC_IODQ.
2019-12-05 00:23:56 +03:00
Leonid Yuriev
a659a7a619
mdbx-cmake: fix/refine options.
2019-12-04 23:44:16 +03:00
Leo Yuriev
df4057db6f
mdbx-cmake: refine installation.
...
Change-Id: I085aba06b957eb1a0e9ce24791bcb5bcc496a609
2019-12-04 22:09:57 +03:00
Leonid Yuriev
84323a8a4c
mdbx: minor workaround for LCC 1.23.19 (E2K) bug.
...
Change-Id: Ia575f8759b037832e268ac1e7d437ed92fa2d5e8
2019-12-04 17:07:32 +03:00
Leonid Yuriev
5cb7989e8d
mdbx: fix Valgrind issue (minor).
...
Change-Id: Ia651a29a0eac7a1279dd7cb30b3247a1f41ab37e
2019-12-03 15:45:24 +03:00
Leonid Yuriev
398b90fb1c
mdbx: fix Coverity warnings (minor).
...
Change-Id: I15c6c707cdeef55c9ce82fe7d5ed0d86224391f5
2019-12-03 15:16:23 +03:00
Leonid Yuriev
d1e2749337
mdbx-cmake: add installation.
...
Change-Id: Ie2f67e51ddaf9444b3c0a817cd5f8e7e37ec8d0e
2019-12-03 03:23:39 +03:00
Leonid Yuriev
bf6bbecbd0
mdbx: add __maybe_unused for flush_incoherent_mmap (minor).
...
Change-Id: If9dea7ccebcb9821bdea68281f8d3f0544e82914
2019-12-03 00:45:27 +03:00
Leonid Yuriev
116a6a8cfe
mdbx: don't create steady-checkpoint for db-shrink in utterly-unsync mode without prev steady-points.
...
Change-Id: I1ec0d6cb9c31af0d151964d06d390ec247c2ac41
2019-12-02 21:08:49 +03:00
Leonid Yuriev
8b4be26ca1
mdbx: rework gc-backlog preparation.
...
Change-Id: I003d7995116a25c2bfdd32b663d4e605a796c17d
2019-12-02 21:08:49 +03:00
Leonid Yuriev
ed986ecbb5
mdbx: remove creation obsolete legacy checkpoints.
...
Change-Id: I2d88b5ef4853d9379188fc450e87e11b28754c75
2019-12-01 23:39:07 +03:00
Leonid Yuriev
2b5eec2295
mdbx: drop internal MDBX_ALLOC_KICK.
...
Change-Id: I819277765992c20ea4076043d5b5470f3ca4e827
2019-12-01 23:39:07 +03:00
Leonid Yuriev
90b69aaac2
mdbx: rework auto-sync & wipe-steady from reclaiming.
...
Change-Id: Id0c298ebfaabafc2e5d4031368bee5a3b6c33dab
2019-12-01 23:39:07 +03:00
Leonid Yuriev
ed9d1a1542
mdbx-tools: cleanup tools from deprecated API.
...
Change-Id: Id1c64edfa7a470ad76f0499d1f58ec482458f8d6
2019-11-30 01:29:48 +03:00
Leonid Yuriev
d83de5bd09
mdbx: deprecate some API.
...
Change-Id: I0770f5ec89dc0cc71381dea1d420c2a3b506ce7f
2019-11-30 01:29:48 +03:00
Leonid Yuriev
2cfe7758cd
mdbx-tools: refine built-in help/usage.
...
Change-Id: Ia06666f48f50e088c796c85e263885ca7181c6a0
2019-11-30 01:29:48 +03:00
Leonid Yuriev
7d74aa6ae8
mdbx-load: add -r
(rescue) and -q
(quiet) options.
...
Change-Id: I6dd8003a6f1c8b3fe7a25ce1f6cac3735a2c9734
2019-11-30 01:29:48 +03:00
Leonid Yuriev
e25daab399
mdbx-dump: add -r
(rescue) and -q
(quiet) options.
...
Change-Id: I35b32a61fbf301651099009d818722b3b893a039
2019-11-30 01:29:48 +03:00
Leonid Yuriev
01ae72a570
mdbx-dump: fix output (don't print version caption to stdout).
...
Change-Id: Id9986a79c0bceb3637c3aee4b669adab6a68dc2f
2019-11-30 01:29:48 +03:00
Leonid Yuriev
2f383d8de3
mdbx: use getmntent() for determine filesystem type.
...
Change-Id: I92921c5083a822c891889668e51726e2f1ce98cd
2019-11-30 01:29:48 +03:00
Leonid Yuriev
4e4a56eda2
mdbx-tools: fix mdbx_chk for new limits API.
...
Change-Id: I67f077296a477ea258b0b0d9e02319f2134a8a74
2019-11-30 01:29:48 +03:00
Leonid Yuriev
d80654fa07
mdbx: rework max key-length and limit API.
...
Change-Id: I3d783f69d4ea438d8a8a0505fa9163715fbdcf9c
2019-11-30 01:29:48 +03:00
Leonid Yuriev
9bd88d80d0
mdbx-chk: refine user-break (ctrl+c) handling.
...
Change-Id: I5b1a71a2945990091c0f472d5e2256ace8dc2065
2019-11-28 12:37:42 +03:00
Leonid Yuriev
c00f484813
mdbx: fix nested txn.
...
Change-Id: Iff752d23a880ed4f5322145446be9c989b837479
2019-11-26 15:27:45 +03:00
Leonid Yuriev
acde45ff3a
mdbx: pre-sync range before mresize().
...
Change-Id: Id205394cf488b5a954ec021af7f2924a549c9a0e
2019-11-18 16:29:47 +03:00
Leonid Yuriev
4af2deb8cd
mdbx: drop obsolete assertion & refine related code.
...
Fixes https://github.com/leo-yuriev/libmdbx/issues/69
Change-Id: Iedf988e9788acb250493032bf55f5c75784652cc
2019-11-18 16:29:30 +03:00
Leonid Yuriev
f285ab59e6
mdbx: fix mdbx_runtime_flags for ALLOY-build.
...
Change-Id: I16a7e3475043066cea7733ed31b7e5d5a5824516
2019-11-18 11:50:21 +03:00
Leonid Yuriev
497aa53e28
mdbx: fix minor typos.
...
Change-Id: Ib0c62eace9c766844a3f44124b525a3c6373c620
2019-11-18 00:13:27 +03:00
Leonid Yuriev
72c944974a
mdbx-tools: refine mdbx_chk (use boot-id, explicitly notify about sync-to-disk).
...
Change-Id: I520df734d9b806bc94b53f0817b71cd8223a7a62
2019-11-18 00:09:47 +03:00
Leonid Yuriev
d390300e60
mdbx: fix lck-file mode-flag while opening existent DB.
...
Change-Id: I3b8d446f6a620e911c0d5e325d8d912f2ca19d93
2019-11-18 00:02:37 +03:00
Leonid Yuriev
d20b9d9ed7
mdbx: move boot-id from LCK to meta.
...
Change-Id: I7a371feb1a2c43e3606c516fe7b4c7d7a4ff6e73
2019-11-18 00:02:37 +03:00
Leonid Yuriev
7ef61e12c0
mdbx: refine update_gc() for large-transaction cases.
2019-11-17 23:57:03 +03:00
Leonid Yuriev
c250500afd
mdbx: performs long assertion-loops only when audit enabled.
2019-11-17 23:57:02 +03:00
Leonid Yuriev
baee0be7ad
mdbx-tools: minor refine mdbx_chk (use const strings).
...
Change-Id: I402c8d97cfa860f21b97bd20b6d6feb190af654e
2019-11-17 23:57:02 +03:00
Leonid Yuriev
7703312b88
mdbx-tools: fix mdbx_chk to avoid creation of missing DB.
...
Change-Id: Ieaeee75c1c8f8b1e426817df86ef1769e691e504
2019-11-16 00:23:03 +03:00
Leonid Yuriev
af6aa30c7c
mdbx: don't sync-on-close deleted files.
...
Change-Id: Ie9358dfd79c9c5b26777e690079b3f081f0a7158
2019-11-16 00:23:03 +03:00
Leonid Yuriev
84ae40172e
mdbx: refine/fix madvise(MADV_DONTDUMP).
...
Change-Id: I3cb56d5d704a60c17da9ae2a276587cf495ce30c
2019-11-16 00:23:03 +03:00
Leonid Yuriev
42d9e06598
mdbx: add MDBX_ACCEDE environment opening flag.
...
Change-Id: If0a08d6fce127f35ff2992988715b7dc1fdb70a9
2019-11-16 00:23:03 +03:00
Leonid Yuriev
cb8fac6f5f
mdbx: prohibit non-WRITEMAP modes under OpenBSD.
...
Temporary `workaround` for OpenBSD kernel's bug.
See https://github.com/leo-yuriev/libmdbx/issues/67
2019-11-14 15:12:19 +03:00
Leonid Yuriev
f0c6292fa3
mdbx: ignore ENOSYS/ENOTSUP from madvice()/posix_madvise()/posix_fadvise().
2019-11-13 23:50:38 +03:00
Leonid Yuriev
c09fbc2ad2
mdbx: refork mdbx_flush_incoherent_mmap().
2019-11-13 23:50:38 +03:00
Leonid Yuriev
fe40af160d
mdbx: split-off mdbx-options into options.h
.
2019-11-13 23:50:38 +03:00
Leonid Yuriev
057812fe02
mdbx: use MAP_CONCEAL when available (compatibility).
2019-11-13 15:49:41 +03:00
Leonid Yuriev
b95fb5b124
mdbx: add auxiliary debug-begin/debug-end includes.
...
Change-Id: I9fad95e7e73a581c49388da31895aed94a3abbe4
2019-11-13 15:47:38 +03:00
Leonid Yuriev
ac75fe2604
mdbx: move platform-related options into osal.h
...
Change-Id: I4bdbc5f89fc468f0068f97cc30f911eb0ab151d3
2019-11-13 11:31:22 +03:00
Leonid Yuriev
0dc544fefd
mdbx: use SysV semaphores on systems without shared mutexes.
...
Change-Id: Ib2ad9ed137ab76999a2a8e832f9f77ff1a0788ca
2019-11-13 11:31:22 +03:00
Leonid Yuriev
2f45c37320
mdbx-posix: refine locking build-options.
...
Change-Id: I09c0dd453dd39e0105176ad8d9e414e2582849fb
2019-11-13 11:31:22 +03:00
Leonid Yuriev
e2ae62bdb2
mdbx: refine gc_update() to avoid fragmentation on rare cases.
2019-11-13 11:24:44 +03:00
Leonid Yuriev
df44539486
mdbx: fix unused
warning for Wpedantic_format_voidptr().
...
Change-Id: I3ac5f83ceb8f9aa28deb56d983595fc55bfcfa93
2019-11-13 11:24:44 +03:00
Leonid Yuriev
a6bf73a817
mdbx: don't rollback when boot-id matches.
...
Change-Id: Iee4656e120bd4205f8528f1fc613cbff1ab4a859
2019-11-13 11:24:44 +03:00
Leonid Yuriev
a7e0b3ccdf
mdbx-build: SunOS/Solaris/OpenIndiana support, etc.
2019-11-11 15:14:03 +03:00
Leonid Yuriev
5af02290e6
mdbx: portability fixes for SunOS/Solaris/OpenIndiana.
...
Change-Id: I0442367e798903598d706c65b536a127ca982fce
2019-11-11 15:13:56 +03:00
Leonid Yuriev
4dfa97cda9
mdbx-posix: fix mdbx_lck_seize() and mdbx_lck_destroy() for rare race-case.
...
Change-Id: I49c1d39665e3ef1eb1422b9da02c5719be3ee3b0
2019-11-11 13:10:22 +03:00
Leonid Yuriev
6a7499c8fc
mdbx: refine POSIX-options detection.
2019-11-11 13:10:22 +03:00
Leonid Yuriev
51440b5542
mdbx: minor fix auto-readahead for buggy platforms (i.e. DragonflyBSD, NetBSD).
2019-11-11 13:10:22 +03:00
Leonid Yuriev
fc48751f8f
mdbx: use MAP_NOSYNC & MAP_HASSEMAPHORE if defined (compatibility).
2019-11-11 13:10:22 +03:00
Leonid Yuriev
3e7944f732
mdbx: use POSIX.1 IPC semaphores on systems without shared mutexes.
...
Change-Id: I5e398257e65c355d1028167f2719232fc55d093a
2019-11-11 13:08:19 +03:00
Leonid Yuriev
647d832556
mdbx: initial mdbx_check_fs_rdonly() and mdbx_check_fs_local().
...
Change-Id: Iff48f1ad1ef54c1e51dceebce16097be030206bd
2019-11-08 18:40:29 +03:00
Leonid Yuriev
b7ed67543f
mdbx-windows: use CreateFileW() instead of CreateFileA().
...
Resolves https://github.com/leo-yuriev/libmdbx/issues/66
Change-Id: I0266a8a77460940332045c19cb561553a5047e7c
2019-11-08 18:39:51 +03:00
Leonid Yuriev
fff19d878f
mdbx: fix update_gc() to avoid rare MDBX_KEYEXIST.
...
Change-Id: I6798e587f62cd570b43b095554c5f3f6adf5198d
2019-11-04 12:31:54 +03:00
Leonid Yuriev
2cfe632296
mdbx: rework/fix rebalance & page merge (fix MDBX_PAGE_FULL).
...
Change-Id: Ice610861d76390e76685c1bfad56fb8fe3462ed2
2019-11-04 12:31:54 +03:00
Leonid Yuriev
cf884f082f
mdbx: initial osal_bootid().
...
Change-Id: I103f61714a1d2e58d4f508b7d814a56f5b58573c
2019-11-04 12:31:51 +03:00
Leonid Yuriev
55395820e3
mdbx: set MDBX_MIN_PAGESIZE to 256 (useful for testing).
...
Change-Id: Ie7f0b68ef7b21bb2f02267752555e2d0e853fcbe
2019-11-04 00:22:13 +03:00
Leonid Yuriev
582fdd7ed2
mdbx: refine mdbx_env_set_geometry().
...
Change-Id: Ib685de60c9109971e3ab42b13ee085a6ed50a1c5
2019-11-04 00:22:13 +03:00
Leonid Yuriev
e7b3a15d54
mdbx: fix/refine mdbx_setup_dxb() for case open existing DB with new geo-params.
...
Change-Id: Iebb9b19c8f81d8629c4b28ed547d27f1a139dc7f
2019-11-04 00:22:13 +03:00
Leonid Yuriev
3cc8e5222c
mdbx: undo/promote geo-changes made by child txn on abort.
...
Change-Id: Ieb291231909ef8e2a0205ffe1708d66b67ac5af7
2019-11-04 00:22:13 +03:00
Leonid Yuriev
415cb5f886
mdbx: refactor me_dbgeo usage and osal-mmap/mresize().
...
Change-Id: I1f29c953abcbd4f2bab7ba52e7dd9da85ea48354
2019-11-04 00:22:13 +03:00
Leonid Yuriev
b4729bd1d6
mdbx: minor refine pgno_align2os_bytes() usage.
...
Change-Id: I4b83792c298aaa4c3ac5f412489a31f639f6d016
2019-11-04 00:22:13 +03:00
Leonid Yuriev
d869e20941
mdbx-chk: don't treat mm_geo.current < dxbfile_pages
as an error
...
This it is valid usual case on Windows, since windows can't shrinking a
mapped file. So we shouldn't see an error while checking such files on Linux.
Change-Id: I830c236c9b2fc1eb21768fceb24e67b9486c0795
2019-11-04 00:22:13 +03:00
Leonid Yuriev
b274c4a730
mdbx: fix to avoid ERROR_USER_MAPPED_FILE on Windows (minor race condition).
2019-11-04 00:22:13 +03:00
Leonid Yuriev
b4a5728455
mdbx: rework readahead management.
...
Change-Id: Ic1e2f3f5bd7fb2e9fd8d5820816e3d2def6ec1b3
2019-11-04 00:22:13 +03:00
Leonid Yuriev
9c89e7c739
mdbx: refine discarding of unused pages (MADV_FREE/MADV_REMOVE/MADV_DONTNEED).
...
Change-Id: I657eb7ef9060214d6ed3d75a2deeebc9ff3df5f5
2019-11-04 00:22:13 +03:00
Leonid Yuriev
40f31ea936
mdbx: add atomic_yield().
...
Change-Id: I0c3be400a880fd97bf1c254fd70a242982aac3f8
2019-11-04 00:22:13 +03:00
Leonid Yuriev
3ee269ddb6
mdbx: support for txnid of the last modification for sub-dbs/kv-spaces.
...
Change-Id: Ifb6684df57608cda88aa9134b275f442358ff46d
2019-11-04 00:22:09 +03:00
Leonid Yuriev
84bff89eb1
mdbx: conform to and use -Wpedantic
.
...
Change-Id: I3056af7ae53c5a7c3ecbfe828ab1d5ee94c2bc26
2019-10-26 00:02:28 +03:00
Leonid Yuriev
c694325ab7
mdbx: fix minor warnings.
...
Change-Id: Iaa614a7d4325d3de6d863c20020c62954da7a1bf
2019-10-25 23:09:23 +03:00
Leonid Yuriev
a0ec89e468
mdbx: fix check-for-unique for the case when more than one new database are opening (i.e. with creation of LCK-files).
...
Change-Id: If712e1ead2e0cdfd72a115bd442d613a8d730839
2019-10-25 21:05:44 +03:00
Leonid Yuriev
42f8154c39
mdbx-cmake: rename MDBX_USE_VALGRIND option.
...
Change-Id: I985befb6c60e8a8c8db1b5d9dd085eb4645b038b
2019-10-25 08:10:15 +03:00
Leonid Yuriev
b905dea2ee
mdbx: fix Coverity warning (insignificant).
...
Change-Id: I046b0e7d5b16f6f1b91dac4d96616dbcd7c601d2
2019-10-25 08:08:24 +03:00
cryptozoidberg
edf5ddad4f
mdbx: get rid of macro redefinition warnings under MSVC.
...
This resolves https://github.com/leo-yuriev/libmdbx/pull/63
Change-Id: Id5ca071fe3060b8d508a28fd48ae13430a7e78a8
2019-10-24 22:15:28 +03:00
Leonid Yuriev
8de8072078
mdbx: minor refine options and build-info.
...
Change-Id: Iadabd8524991c10e76c0d38e4eef10c65224906e
2019-10-24 22:12:14 +03:00
Leonid Yuriev
81fd0beb1a
mdbx: rework/fix unaligned access.
...
Change-Id: Ib0208e78786ac84551384ed57ac580fe0717840e
2019-10-24 22:12:14 +03:00
Leonid Yuriev
b7d27c1b36
mdbx: rework internals for using C99 flexible array member
(preparation for -fsanitize=undefined).
...
Change-Id: I0d1836d6108ef379c43231720ef703ff69fc426d
2019-10-24 22:12:14 +03:00
Leonid Yuriev
70350bad81
mdbx-cmake: require C99 or use C11 when available.
...
Change-Id: I241e8c38232750efb537a0b581f822540f207cdc
2019-10-24 22:12:14 +03:00
Leonid Yuriev
83a0c31b35
mdbx: converts macros to inline functions, rework page_fill_enough() and thresholds.
...
Change-Id: I18ff12bdcafac37cc73b6228788ce5bbc752773f
2019-10-24 22:12:14 +03:00
Leonid Yuriev
ed515d4642
mdbx: fix static library build on Windows.
2019-10-24 11:51:25 +03:00
Leonid Yuriev
411ed3e578
mdbx: fix Coverity warnings (minor).
...
Change-Id: I8636560583c11eeaa6d37ba9f7f66e1afc2232da
2019-10-21 11:46:17 +03:00
Leonid Yuriev
efa855b497
mdbx: drop unused dpl_mark4removal().
...
Change-Id: I23dcbbad8b0fc4691a755125c2e58fa9b529423b
2019-10-21 10:00:28 +03:00
Leonid Yuriev
2eab9c2957
mdbx: refine/optimize list-related loops.
...
Change-Id: I15b2305d1400819fdc1ae0ad306df70bc5f20388
2019-10-21 07:50:11 +03:00
Leonid Yuriev
e6462dfe58
mdbx: minor refine mdbx_chk
output.
...
Change-Id: I2c2560910d2908afe0f4a3aee0dc465ca7e24030
2019-10-21 07:50:11 +03:00
Leonid Yuriev
f5d75a85b0
mdbx: minor refine setup_dxb() logging.
...
Change-Id: I985ded5fce6d829563591d9b5ddb5b172100e43d
2019-10-21 07:50:11 +03:00
Leonid Yuriev
081603e6bc
mdbx: alter update-gc for intermediate refunding of pages.
...
Change-Id: I551e94ed897c04af09f59a3fd96c694ef243d3a5
2019-10-21 07:50:11 +03:00
Leonid Yuriev
4e386be914
mdbx: don't hold dbi-lock during tree deletion inside mdbx_drop().
...
Change-Id: I29824271ba09a4443196bc1207279a257a8e26c0
2019-10-21 07:50:11 +03:00
Leonid Yuriev
15ce797863
mdbx: refine/optimize mdbx_page_alloc().
...
Change-Id: Iebbb8a611a82a379cf23b683bb21c9b6626ea9a5
2019-10-21 07:50:11 +03:00
Leonid Yuriev
36477ef408
mdbx: minor refine/optimize mdbx_page_new().
...
Change-Id: Ie1b227cbeceec8b1fc64630b8d1c12210d98dc20
2019-10-21 07:50:11 +03:00
Leonid Yuriev
b11d655173
mdbx: refine/optimize update-gc (remove anything in our spill list from parent's dirty list).
...
Change-Id: I945bdbc1431bac39173121210e1a08787e027b0c
2019-10-21 07:50:11 +03:00
Leonid Yuriev
781a814864
mdbx: refine/optimize update-gc (filter-out list of dirty-pages from loose-pages).
...
Change-Id: I73caa11e8a6378c307eb2e0a8199d0428dc14e05
2019-10-21 07:50:11 +03:00
Leonid Yuriev
363841caf8
mdbx: rework/optimize pages refunding.
...
Change-Id: I9315ea9187eaff4572536ab9c895fb6995eebd94
2019-10-21 07:50:11 +03:00
Leonid Yuriev
7f0dd35702
mdbx: more checking in mdbx_dirtylist_check().
...
Change-Id: I4bf5b3ee03a816f34000586b760fd7b01994d3aa
2019-10-21 07:50:11 +03:00
Leonid Yuriev
5c54566c5c
mdbx: rework/fix retire-to-parent-txn pages (fix LMDB bug).
...
Change-Id: I81c3d48f19b4c7e62d77cfecc167235374f66402
2019-10-21 07:50:11 +03:00
Leonid Yuriev
659933d0c9
mdbx: rework mdbx_page_flush(), providing flush_begin & flush_end.
...
Change-Id: Id7366d427d204b444ab76c880ad1c0757a7de94e
2019-10-21 07:50:11 +03:00
Leonid Yuriev
6a01955810
mdbx: rework atomic-ops & safe64_reset_compare() to avoid use libatomic on true-32-bit arches.
...
Change-Id: I27aa8dc9505a469e35a7fe06660e9944e4c1974c
2019-10-19 00:16:48 +03:00
Leonid Yuriev
a907109cce
mdbx: fix MDBX_node for big-endian.
...
Change-Id: I436fc01e379908df07bcb829f0d9cf6999c8c133
2019-10-16 14:22:38 +03:00
Leonid Yuriev
0f3994d506
mdbx: fix/refine mdbx_is_dirty().
...
Change-Id: I70bb46b47e7c313fdfd0b130ee55b82dd75e92d2
2019-10-16 11:34:33 +03:00
Leonid Yuriev
b84bb4f805
mdbx: add MDBX_TXNID_STEP macro for debugging.
...
Change-Id: I4768c8b39f3317ec3a5da8627d736f2f28bf0d51
2019-10-15 23:53:00 +03:00
Leonid Yuriev
8467552f0b
mdbx: fix internal audit.
...
Change-Id: I9b3360216bbfc1a1a6f6052aca78331b01dc80ec
2019-10-15 23:52:17 +03:00
Leonid Yuriev
5f8ecf0144
mdbx: fix Valgrind support.
...
Change-Id: I246bddb6536fa03e46d302dcdc6700007ffbe06c
2019-10-15 21:54:38 +03:00
Leonid Yuriev
a0e9c33e54
mdbx: rework page loosing/retirement.
...
Change-Id: I194bee1ba21f5bac53342924f00555620151a43d
2019-10-15 21:54:31 +03:00
Leonid Yuriev
ee77920a2e
mdbx: refine loose-pages refunding.
...
Change-Id: I7b76476e8c0ac3d35c1de53edfc943a14389d167
2019-10-15 21:48:09 +03:00
Leonid Yuriev
06193f4267
mdbx: refine page-number-list checking.
...
Change-Id: I89524075b416eb8bc63b1e0910baf3a37d6589f4
2019-10-14 17:28:53 +03:00
Leonid Yuriev
137b19aac2
mdbx: workaround for Apple-LLVM bug.
...
Change-Id: Ib1b504240d71fe20cc306b81b175bbb63737bea0
2019-10-12 23:05:22 +03:00
Leonid Yuriev
3df5f60a70
mdbx: include <malloc_np.h> for FreeBSD & OpenBSD.
...
Change-Id: I4b9c29bf63a03c281017f50bbdfe3495740804af
2019-10-12 22:47:27 +03:00
Leonid Yuriev
bb922c208c
mdbx: add mdbx_is_readahead_reasonable().
...
Change-Id: Iac090a9050d6b046b62b2c79cefbc70cc62c9144
2019-10-12 22:38:36 +03:00
Leonid Yuriev
c51a6e6d95
mdbx: move madvise(MADV_RANDOM) to under control of MDBX_NORDAHEAD flag.
...
Change-Id: Ied2473ad054797a20ec2c177106a9a7e85fab1d1
2019-10-12 11:07:21 +03:00
Leonid Yuriev
e04ea50c18
mdbx: refine madvise(MADV_REMOVE_OR_FREE_OR_DONTNEED), add 256K threshold.
...
Change-Id: I1fe314fa10062dca0870ec035454370bfacf20f0
2019-10-12 11:07:21 +03:00
Leonid Yuriev
f6ba670cd0
mdbx: minor fix for __gnu_linux__.
...
Change-Id: Ic262bf863927fe86ab0091d809388569f0d59bec
2019-10-12 11:07:21 +03:00
Leonid Yuriev
8921da2787
mdbx: fix internal comments.
...
Change-Id: Ica95587f74501e78259805cba4393a430af0437b
2019-10-12 11:07:21 +03:00
Leonid Yuriev
4560ddcd1e
mdbx: refine ending of read-only transactions.
...
Change-Id: I56d07d75e4f5f64fd34e5b780024c145eb8299ed
2019-10-12 11:07:21 +03:00
Leonid Yuriev
99e9956410
mdbx: make mdbx_env_set_geometry() behavior equal to LMDB (i.e. fixed size).
...
Change-Id: I26dfcbb03362dde6fbf4b0f59530ddbf4e2b0723
2019-10-11 16:54:55 +03:00
Leonid Yuriev
8861f1377c
mdbx: roundup buffer size inside env_copy2fd().
...
Change-Id: Iaa9d1adb934d36a28be3804683ffbaf43552d54b
2019-10-11 14:16:49 +03:00
Leonid Yuriev
4d692821cb
mdbx: partial workaround for ASAN false-positive (due internal bug).
...
Change-Id: Ib86e187e58f3efbb5e5da95219f1b6e990022b9a
2019-10-11 14:16:15 +03:00
Leonid Yuriev
3c4d87520e
mdbx: drop NEXT_LOOSE_PAGE macro.
...
Change-Id: Icee989a7bcd89a5fcd2664c6a9a99cdc546cc8f1
2019-10-11 01:06:26 +03:00
Leonid Yuriev
39c1238d8e
mdbx: refine Valgrind support (i.e. avoid false-positives).
...
Change-Id: I688b2e905d0b705c34ab29df29bfd0a9bcdde8c9
2019-10-11 01:06:26 +03:00
Leonid Yuriev
ab01078cd7
mdbx: refine/fix SORT_IMPL macro.
...
Change-Id: Ifc2968ead891c97442cec85076f7824a285f84b8
2019-10-11 01:06:12 +03:00
Leonid Yuriev
a6aad9c918
mdbx: use malloc_usable_size() and analogues.
...
Change-Id: I35b3fe0f1a1c884ba2013c9a861057b38f6a2174
2019-10-10 22:36:53 +03:00
Leonid Yuriev
e519b8f315
mdbx: fix memleak after write-txn state rework.
...
Change-Id: I001d1d82c8091de1420617e98820ca7d6b69fe4a
2019-10-10 22:15:47 +03:00
Leonid Yuriev
e5caec031f
mdbx: fix warnings from old/obsolete clang (minor).
...
Change-Id: I4eaaa45bf2ebd68efb572dad04ba025e2608f968
2019-10-10 00:29:43 +03:00
Leonid Yuriev
273af26244
mdbx: rework nested transactions and write-transaction state.
...
This resolves https://github.com/leo-yuriev/libmdbx/issues/62
Change-Id: Icbd762ca69ab1ccf8c3440c71931d2ac14599a1b
2019-10-09 23:27:01 +03:00
Leonid Yuriev
1c9c637701
mdbx: refine internal audit for intermediate state checking.
...
Change-Id: Iba2b7e5b8df09374c9bf941cc5efa1ed6e826288
2019-10-09 13:37:46 +03:00
Leonid Yuriev
cee1aeaf26
mdbx: fix comment typo.
...
Change-Id: I2c48e039ee0b135966a66aa2f33ba5c4897a4bc3
2019-10-09 13:37:24 +03:00
Leonid Yuriev
64016c86f6
mdbx: add minor assertions info mdbx_env_walk().
...
Change-Id: Ibeff6a52088fc858d00b6625a2754aceffb1a382
2019-10-09 13:36:50 +03:00
Leonid Yuriev
6efe0686c9
mdbx: fix Coverity warnings.
...
Change-Id: I70734c5bf7e3d1088522c0dccd88948865f8192f
2019-10-06 19:05:08 +03:00
Leonid Yuriev
7d621f6f0a
mdbx: auto-define _GNU_SOURCE under control of MDBX_DISABLE_GNU_SOURCE.
...
Change-Id: I314d88b86517e3c44ad35fe02d3a27cb987c6d60
2019-10-06 18:45:52 +03:00
Leonid Yuriev
440bfec193
mdbx: allow 256-byte pages.
...
Change-Id: I697de67683fb040ea0e360515a5a0839d97e9aa6
2019-10-05 23:36:55 +03:00
Leonid Yuriev
8291de71cb
mdbx: support keys and dupsort values upto maxnode (half of a page) size.
...
Change-Id: I7717d55a0d6a7fdc4dc3caba8f8d3ad46a132f61
2019-10-05 23:36:55 +03:00
Leonid Yuriev
d9e1d7f23a
mdbx: fix assertions inside pnl_search().
...
Change-Id: I735e54823b64a1ca03d7132c9ccc4e443d9b25a5
2019-10-04 18:52:15 +03:00
Leonid Yuriev
aa92d6b7e7
mdbx: add paranoid assertions to qsort and bsearch macros.
...
Change-Id: I68efcf83576dd01e2f0c37ca8afb30967f5369a9
2019-10-04 18:52:15 +03:00
Leonid Yuriev
529d484884
mdbx: fix audit for retired-pages tracking (minor, i.e. false-negative).
...
Change-Id: Ied44bc18efec7178ca5cc5f3324cfc75be24125a
2019-10-04 18:52:15 +03:00
Leonid Yuriev
39d43a5b57
mdbx: alter mdbx_cursor_put() paths.
...
Change-Id: I1836f8237162ffa34ce432038131fb6171fb7104
2019-10-04 18:52:15 +03:00
Leonid Yuriev
9e92ea2372
mdbx: add mdbx_page_check().
...
Change-Id: I8350d774f841726ca967be732593e33bfa8a6230
2019-10-04 18:52:15 +03:00
Leonid Yuriev
8768641872
mdbx: refine/simplify MDBX_node.
...
Change-Id: Idb3843727a409c3ef8d1d54e226a6f578a57c32e
2019-10-04 15:59:03 +03:00
Leonid Yuriev
daddd53793
mdbx: refine mdbx_page_copy().
...
Change-Id: I73ad272b468430e7bf79462750887e75ef71bd60
2019-10-04 15:59:03 +03:00
Leonid Yuriev
bf818ddf1e
mdbx: fix assertion inside mdbx_txn_begin().
...
Change-Id: I0184c094e0f1fdc1a3ed9aede803cbfc2595ff05
2019-10-04 15:59:03 +03:00