Leo Yuriev
8423a0a8bd
mdbx: txnid-safety for non-64-bit and/or not-atomic platforms.
2019-09-20 20:23:25 +03:00
Leonid Yuriev
d15a6b935c
mdbx: avoid "unused static function" warnings.
...
Change-Id: I438a9fa3fa099ad96bca5c1af1f528da4a01ddff
2019-09-19 14:04:10 +03:00
Leonid Yuriev
ab456bf376
mdbx-cmake: fix MDBX_BUILD_FLAGS list-case.
...
Change-Id: I4c2ce187e31ba3f7b225049b1c96a81fbfd9dead
2019-09-19 03:31:48 +03:00
Leonid Yuriev
7c39c16829
mdbx-tools: rework mdbx_reader_list() & mdbx_stat.
...
Change-Id: I0524cad93ca439e74eba9486cbcbeacf4253dd84
2019-09-19 01:21:35 +03:00
Leonid Yuriev
2f2df1ee76
mdbx: implement MDBX_TXN_CHECKOWNER option.
...
Change-Id: Ia283dc9c4d984de1e74915481118f7f4fb5ba5c8
2019-09-18 22:34:05 +03:00
Leonid Yuriev
8fa718c5f9
mdbx: refine mdbx.h and API description, etc (4 of 5).
...
Change-Id: I36955c54f55facfb31b403f12fe6fd16c789e167
2019-09-18 04:00:57 +03:00
Leonid Yuriev
89db804c1a
mdbx: refine geo-params management inside txn.
...
Change-Id: I70acfe4542ea3f8d878bdb7bfba422233dcce8ef
2019-09-17 23:53:38 +03:00
Leonid Yuriev
d1327b016d
mdbx: refine PID checking mdbx_env_close_ex() for closing-after-fork.
...
Change-Id: I5669b3477ef2e5fc30d6211668a01d3ac78ee163
2019-09-17 01:04:25 +03:00
Leonid Yuriev
86f2710c2e
mdbx: return MDBX_RESULT_TRUE/FALSE from mdbx_env_sync_ex().
...
Change-Id: Ia39051ef137df7892181d936e1139ab2a7c94ab4
2019-09-16 22:30:58 +03:00
Leonid Yuriev
e03addc8f9
mdbx: ensure to sync meta-mages in env_sync_ex().
...
Change-Id: I540c8353d47acc2e46d6c3a26cfe3e4f6d9249bf
2019-09-16 21:54:43 +03:00
Leonid Yuriev
78da9e52c4
mdbx: return consistency info from mdbx_env_stat().
...
Change-Id: Ia53259a8590118adf01b03a6eb7835c62376ad1f
2019-09-16 20:55:45 +03:00
Leonid Yuriev
0d4092f4ea
mdbx: add to env_copy() support for pipe/socket.
...
Change-Id: Ib2fc0249b494b885f28265f877de9953f089b403
2019-09-16 19:24:36 +03:00
Leonid Yuriev
b19e180fab
mdbx: refine mdbx.h and API description, etc (3 of 5).
...
Change-Id: I05890bdf2e29c6c5a4b1f861f5bfda920e970126
2019-09-16 02:25:06 +03:00
Leonid Yuriev
4022110955
mdbx: reset returning-by-pointer result on error.
...
Change-Id: I5e0aa1eae343dc9acc36a95e4f7e11104efc83ce
2019-09-15 22:10:39 +03:00
Leonid Yuriev
5f22a5568d
mdbx: allow MDBX_MAPASYNC for particular txn.
...
Change-Id: I0ed1a7567a3f7bfbae2bfa6995ad8f6c327d91a9
2019-09-15 22:10:15 +03:00
Leonid Yuriev
1402a511a4
mdbx: drop dup-defines MDBX_TXN_NOMETASYNC, MDBX_TXN_NOSYNC, MDBX_TXN_RDONLY. etc.
...
Change-Id: I7edef9477e15cb6c2291fe82c1b014ff81d2383a
2019-09-15 18:19:46 +03:00
Leonid Yuriev
4bcc1eef09
mdbx: disallow multi-opening without MDBX_DBG_LEGACY_MULTIOPEN.
...
Change-Id: I0e11d686954bd8c89dac9a46b4c5e17bc0dd6419
2019-09-12 21:41:57 +03:00
Leonid Yuriev
c8928675c6
mdbx: automatically create database directory.
...
Change-Id: Ic1d4c9ce6f29924f5c112afc3065f08584307d39
2019-09-12 14:56:07 +03:00
Leonid Yuriev
1d08f9e673
mdbx: refine mdbx.h and error strings (1 of 5).
...
Change-Id: Iaa6c4afeb9268d916ef1e8e23fdf12b7f603869f
2019-09-12 14:18:10 +03:00
Leonid Yuriev
eb4159ac88
mdbx-posix: support to close environment after fork() from a child process.
...
Change-Id: I20ab9cf4525bfcacd10043e2afe7e1aa26a2af6c
2019-09-12 01:19:23 +03:00
Leonid Yuriev
4b979826ec
mdbx: fix update_gc() to avoid leaking values from uninit malloc'ed mem.
...
Change-Id: I5b98fc9f5d26ffdfe90af81d9fdd07f49c1e85c9
2019-09-12 00:09:25 +03:00
Leonid Yuriev
712bad5935
mdbx-cmake: avoid '-NOTFOUND' inside MDBX_BUILD_FLAGS.
...
Change-Id: Ia8974d0ffa092a5ffbfe553af49926c3532c88a3
2019-09-11 22:04:28 +03:00
Leonid Yuriev
8231aa5b47
mdbx-posix: avoid Coverity warnings (don't try to recover mutex if unlock failed).
...
Change-Id: Iaa5b567c810b7e3fd6f5003111e41b752d83b8bb
2019-09-11 21:47:31 +03:00
Leonid Yuriev
7d9d3528c5
mdbx-cmake: fix definitions prefix.
2019-09-11 21:32:25 +03:00
Leonid Yuriev
4ea1d2f8d2
mdbx: accept MDBX_EACCESS and MDBX_EPERM for without-LCK read-only mode.
...
Change-Id: I024243184c06ddf86bcc62d6e4b1b951d21789d5
2019-09-11 20:40:06 +03:00
Leonid Yuriev
6fc3b89f79
mdbx: add reader_check_timestamp info LCK.
...
Change-Id: I2f53b5996def8ff1d87a011fc662b94e2be3c467
2019-09-11 19:13:24 +03:00
Leonid Yuriev
0d8b59fa3b
mdbx: check readers while opening.
...
Change-Id: Ieefc78d0d3922e3f98efa557f8e67aada68c4841
2019-09-11 18:58:51 +03:00
Leonid Yuriev
8f08e1c7ed
mdbx: fix cross-build & qemu-testing issues.
...
Change-Id: I6b2343cc4e08c3cb706a190c4c515965182733a2
2019-09-11 18:58:51 +03:00
Leonid Yuriev
228a74c41d
mdbx-chk: refine/fix for MAX_DBI case.
...
Change-Id: Ie0deb701bcb35634951c8080d57294682937b5b7
2019-09-11 18:58:51 +03:00
Leonid Yuriev
17ba1f4d22
mdbx-cmake: fix/refine RPATH for tools.
...
Change-Id: Id97db43475b757f74eb5a5532390e0e65d610df0
2019-09-11 02:09:21 +03:00
Leonid Yuriev
5cfcc0e3c1
mdbx-cmake: add template for build amalgamated source code.
...
Change-Id: Ie0908ab62460eb51f2f050fcce915fe4e64f61ca
2019-09-11 02:09:21 +03:00
Leonid Yuriev
5e9e417cf6
mdbx-install: refine cmake-install, install man-pages.
2019-09-11 00:56:07 +03:00
Leonid Yuriev
acc6969594
mdbx-tools: minor refine mdbx_chk.
...
Change-Id: I71db479944a305f03019d985b91a39cd51ba9981
2019-09-10 19:28:07 +03:00
Leonid Yuriev
aa1c609c28
mdbx: set MIN_TXNID=1.
...
Change-Id: If67d371c0681d7b85886c83b423d1b9c039d18c3
2019-09-10 19:27:46 +03:00
Leonid Yuriev
7433436ec5
mdbx: add man-page for mdbx_chk, refine other.
...
Change-Id: I0c5026f0b753525ec5b21e11957c23bf570fbe0b
2019-09-10 19:01:39 +03:00
Leonid Yuriev
d1d1258591
mdbx-build: made 'config.h' optional.
...
Change-Id: Iafc968cb7000f77cf23169ce07b532386bbce029
2019-09-10 15:52:37 +03:00
Leonid Yuriev
3ec081c187
mdbx-build: add 'make dist' target.
...
Change-Id: I72c2ff2f90e9da4664bf542761fe445bb713a67a
2019-09-10 02:28:41 +03:00
Leonid Yuriev
e7095e9ada
mdbx: remove UTF8-BOM (preparation for 'make dist').
...
Change-Id: I2d0ccc9f7bbed6d57b2fe6ef156f33531a4eeb69
2019-09-10 02:18:50 +03:00
Leonid Yuriev
be72cd81dc
mdbx: add MDBX_MIN_PAGESIZE & MDBX_MAX_PAGESIZE.
...
Change-Id: I66ba4b637ed5acabb734bbd380e618e01019ade2
2019-09-10 02:13:33 +03:00
Leonid Yuriev
449307a69f
mdbx-build: sourcery pinning (but cmake requires manually config-files removal for now).
2019-09-09 14:29:05 +03:00
Leonid Yuriev
0667f4f211
mdbx-windows: define the dll's entry point only depending on the MDBX_AVOID_CRT option.
2019-09-09 11:32:50 +03:00
Leonid Yuriev
1829a2a5c1
mdbx: workaround for FreeBSD shared mutexes initialization.
...
- pass inprocess_neighbor into mdbx_lck_init().
- don't perform mutexes initialization if LCK already used in the current process.
- don't perform additional in-process mutex initialization if LCK used in any other process(es), except for FreeBSD.
2019-09-04 11:46:03 +03:00
Leonid Yuriev
a45c0d9026
mdbx-posix: minor fix lck_op().
2019-09-04 03:51:18 +03:00
Leonid Yuriev
a55cffaae8
mdbx-osx: ignore fcntl(F_RDADVISE) error (RAM-disk, etc).
2019-09-04 03:09:18 +03:00
Leonid Yuriev
b8ac1daae0
mdbx-tools: print git-tree while show version info.
2019-09-03 23:43:29 +03:00
Leonid Yuriev
6495e2f87c
mdbx-windows: add cmake-generation of extra-import-library for ntdll.dll
2019-09-03 21:18:05 +03:00
Leonid Yuriev
967900e2e9
mdbx-cmake: refine/fix MDBX_BUILD_TARGET for Windows.
2019-09-03 19:13:26 +03:00
Leonid Yuriev
263837094e
mdbx-build: refine CMake scripts, add build options.
...
Change-Id: Ie3db2f6439d5cc7ef3cd9ebb5b8e5d5d34f743dd
2019-09-03 02:56:01 +03:00
Leonid Yuriev
874418a301
mdbx: rework POSIX-lck and merge with Linux-lck.
...
Change-Id: Id8fbc81b9a2ad3a3a7499ecf9a012314e1f8062a
2019-09-03 02:43:14 +03:00
Leonid Yuriev
098f8a0d77
mdbx: add MDBX_READERS_LIMIT.
...
Change-Id: I2ee97004c084aeb6290c56b8f6415adc464a1bcb
2019-09-03 02:43:14 +03:00
Leonid Yuriev
6f39d8228d
mdbx-cmake: add MDBX_ALLOY_MODE option.
...
Change-Id: I486f737fc24a48ecd3444859bee2132c9606aef5
2019-09-03 02:43:09 +03:00
Leonid Yuriev
5a87faf9af
mdbx-build: start using CMake (incomplete; no properly installation for now).
2019-09-03 02:33:57 +03:00
Leonid Yuriev
f81374a9ce
mdbx-build: amalgamation.
...
Change-Id: Ic32de6ee119df2bc12136b882f4f7cabaa1314a9
2019-09-03 02:30:55 +03:00
Leonid Yuriev
b42462c484
mdbx: minor/paranoid fix mdbx_strerror().
2019-08-31 13:34:05 +03:00
Leonid Yuriev
113b29e68d
mdbx: add LCK-tracking to resolve double-open issue with POSIX-filelocks.
...
Change-Id: I29377000e4dde3c43527302b55d0daec58b709f5
2019-08-31 00:55:15 +03:00
Leonid Yuriev
a66cefb198
mdbx-tools: use ANSI2OEM-versions of mdbx_strerror() for Windows.
...
Change-Id: I15500eec60b20e45c2881499a809a00fb4d661fa
2019-08-30 00:01:38 +03:00
Leonid Yuriev
368b48b41b
mdbx-windows: add mdbx_strerror_ANSI2OEM() and mdbx_strerror_r_ANSI2OEM().
2019-08-30 00:01:38 +03:00
Leonid Yuriev
10ab5dc032
mdbx: refine mdbx_strerror() and mdbx_strerror_r().
...
Change-Id: I47588cea9f281e71d0e6b81a86a50124e55bc3d4
2019-08-30 00:01:38 +03:00
Leonid Yuriev
51e7159f36
mdbx: dynamically discarding unused tail pages of DB file.
...
Change-Id: I1a0eee50cd27de26521e65c9f7ea51a527a0424e
2019-08-30 00:01:38 +03:00
Leonid Yuriev
327e5feb97
mdbx-windows: one more fix build for Windows/SDK pair.
...
Change-Id: Ifa480703b153625d0fa96a15d70bd0c452352cb6
2019-08-29 23:48:51 +03:00
Leonid Yuriev
648f991a5b
mdbx-windows: fix build with modern SDK but for legacy Windows.
...
Change-Id: Ic443815838715be8cc6565d4d7735651af0b58cc
2019-08-29 23:21:22 +03:00
Leonid Yuriev
60d6685665
mdbx: fix typo inside mdbx_setup_debug().
...
Change-Id: I1df92033889572cefa6ff6a54ec2cff9d977fc12
2019-08-28 04:56:36 +03:00
Leonid Yuriev
25e20315ae
mdbx: minor fix for MSVC2019.
...
Change-Id: I628049e7c3a653ec3b549c45450677ec5ab883a7
2019-08-28 04:53:03 +03:00
Leonid Yuriev
9ddfa4f9c8
mdbx-windows: use PrefetchVirtualMemory().
2019-08-28 02:35:34 +03:00
Leonid Yuriev
fd0c92927a
mdbx: refine usage of posix_fadvise()madvise()/posix_madvise()/F_RDADVISE.
2019-08-27 21:35:43 +03:00
Leonid Yuriev
8329f5b6a1
mdbx-load: fix backslash escaping (for compatibility with ITS#9068).
...
In fact MDBX not affected by this bug, since a very long time mdbx_dump was fixed to not produce a problematic sequence of backslash.
For compatibility with LMDB after http://www.openldap.org/devel/gitweb.cgi?p=openldap.git;a=commit;h=5c012bbe033f9bbb273078b07dded59f080d348d
Change-Id: I8ff8e003ae29504605402b937becd4fb37120408
2019-08-27 14:50:19 +03:00
Leonid Yuriev
b3a9b3ca1a
mdbx: avoid refs to mdbx_runtime_flags from tools.
2019-08-27 00:29:15 +03:00
Leonid Yuriev
55ca2f0ed1
mdbx: makes handling NDEBUG option more convenient.
...
Change-Id: Icb8f2ddc66273d4ef4b17f1a27e6a34d2ffadd47
2019-08-26 22:57:14 +03:00
Leonid Yuriev
5eb3b77efe
mdbx-posix: rework LCK seize/destroy.
2019-08-25 22:40:35 +03:00
Leonid Yuriev
2536dc47ac
mdbx: refine features-macros for xBSD.
2019-08-25 16:04:33 +03:00
Leonid Yuriev
a03c5d1f3f
mdbx-posix: destroys shared mutexes in the last process.
2019-08-25 14:18:06 +03:00
Leonid Yuriev
ed58af2512
mdbx-posix: minor fix mdbx_lck_destroy().
2019-08-25 05:20:58 +03:00
Leonid Yuriev
137d652d77
mdbx: refine attribute-based macros.
2019-08-25 04:37:15 +03:00
Leonid Yuriev
7780b76cf0
mdbx: fix internal typo.
...
Change-Id: Ib31e8f02d816758a66b5e6b260714e25648f66c2
2019-08-25 04:36:30 +03:00
Leonid Yuriev
93f82f47bd
mdbx: refine setup_debug(), add MDBX_DBG_LEGACY_MULTIOPEN.
...
Change-Id: I5d144f6fa27b8f5885fa0a0fbd11fe1d44bcc41c
2019-08-25 04:36:28 +03:00
Leonid Yuriev
33a4f31f92
mdbx: fix reclaiming_detent() for out-of-txn case.
...
Change-Id: I5275f4f3676b125e860f6a7c204a5f9cdc65dd5f
2019-08-23 17:46:33 +03:00
Leonid Yuriev
4ceaf842fe
mdbx: add timed auto-sync feature.
...
Change-Id: Ia9b8529fda321d5f78b306f270d157a78f708916
2019-08-23 13:13:20 +03:00
Leonid Yuriev
68e0076ca3
mdbx: rework auto-sync by volume feature.
...
Change-Id: I0a34a65a974f28c6f0a950c11d55a43cfcfcab22
2019-08-23 12:05:09 +03:00
Leonid Yuriev
6f8238e1e9
mdbx: LCK-format version 3.
...
The LCK file is re-created at every opportunity when the process that
opens the database is the only one that works with it. Thus the change
of the format of the file LCK creates only minimal compatibility
problems.
Applications using different versions of _libmdbx_ will be able to work
with one database alternately, but not at the same time. This appears to
be an acceptable inconvenience in exchange for new features.
Change-Id: I9414b3fffd53d5519c8172c57345b1eaf6e51c77
2019-08-23 03:38:11 +03:00
Leonid Yuriev
de88707946
mdbx: don't shrink DB less largest reader inside mdbx_env_set_geometry().
...
Change-Id: I42a5d3a08313fb9590a6730bc0dc06c7b4f16634
2019-08-23 02:34:54 +03:00
Leonid Yuriev
0c63859459
mdbx: minor refine copy_asis().
...
Change-Id: I5d6240a99cba7e16e39f6466a7e582a068ab746a
2019-08-23 02:34:54 +03:00
Leonid Yuriev
65fd8be9b5
mdbx: fix env_sync_ex() for out-of-txn case.
...
Change-Id: Ie19bbe1d467ce4fc83f8dfc1e367070f532ee335
2019-08-23 02:34:45 +03:00
Leonid Yuriev
9168f8c69d
mdbx: fix NULL-deref bug (Coverity).
...
Change-Id: If48f1780d2887b6c2041effc6ca0f158eddb29c2
2019-08-21 02:07:02 +03:00
Leonid Yuriev
e04bfc05fa
mdbx: rename MDBX_OSX_SPEED_INSTEADOF_DURABILITY option.
...
Change-Id: I1d0a05880507da0781ccd2bff5fa68610ad884a9
2019-08-20 15:04:52 +03:00
Leonid Yuriev
6f0a11f155
mdbx: merge branch 'osx-try'.
...
This resolves https://github.com/leo-yuriev/libmdbx/issues/49 .
Change-Id: Ib20c3898e99ca229f10e7d41cda3989b8b4a832c
2019-08-20 03:18:31 +03:00
Leonid Yuriev
657d37c9e3
mdbx: add MDBX_OSX_SPEED_OR_DURABILITY build-time #define for MacOS.
2019-08-20 02:48:30 +03:00
Leonid Yuriev
ccbf3a2bcf
mdbx: rework mdbx_filesync().
2019-08-20 00:56:06 +03:00
Leonid Yuriev
261f697d8c
mdbx: skip msync(MS_ASYNC) on Linux > 2.6.19.
...
Change-Id: Ic1f631ef856a09cf62353c2b0092b0341ecf4fa2
2019-08-19 21:31:23 +03:00
Leonid Yuriev
226cb3ac90
mdbx: use F_FULLFSYNC on MacOS.
2019-08-19 20:41:02 +03:00
Leonid Yuriev
91088af935
mdbx: initial OSX support.
2019-08-13 02:10:03 +03:00
Leonid Yuriev
7960f67ea6
mdbx-chk: "backed-pages > file-pages" isn't error in the non-exclusive or read-only modes.
2019-08-12 15:44:15 +03:00
Leonid Yuriev
bceace7a09
mdbx: clarify shrink/grow-related internals.
2019-08-12 15:44:15 +03:00
Leonid Yuriev
5244c1a9c2
mdbx-chk: "backed-pages less filesize" isn't an error on Windows.
...
Change-Id: Iea212a469225b0617221cdf292352eb1f896b4c6
2019-08-12 12:23:02 +03:00
Leonid Yuriev
cfaed9d761
mdbx-chk: don't use internal mdbx_filesize().
...
Change-Id: I539b92f345ba7884629b702b2568ca805466be3a
2019-08-12 11:40:58 +03:00
Leonid Yuriev
5b09105a6d
mdbx-chk: check filesize/backed-pages/alloc-pages.
...
Change-Id: I231e461d81d3157441f67d2c28470283eb68920a
2019-08-12 02:55:53 +03:00
Leonid Yuriev
bc3d1a84cc
mdbx-chk: use mdbx_env_stat2() and mdbx_env_stat2() to avoid races.
...
Change-Id: Ib956c19bec0b8bf9999cf1e97b8b630f119a0906
2019-08-12 02:55:53 +03:00
Leonid Yuriev
17407c9ecc
mdbx: add mdbx_env_info2(txn) and mdbx_env_stat2(txn).
...
Change-Id: Ifd128185a084c9dc61da140eeeaaf4b6022d3537
2019-08-12 02:55:53 +03:00
Leonid Yuriev
d6a2f98ef5
mdbx: more env-signature checks.
...
Change-Id: I0155821e9b03731f755e43640d8dc9e5c12acf62
2019-08-11 22:54:06 +03:00
Leonid Yuriev
a6449f36f6
mdbx-chk: more for false-positive 'wrong idl entry' fix.
...
Change-Id: I66e42a98c8f4a5c58e12adb666984fed8a70bece
2019-08-11 21:41:01 +03:00
Leonid Yuriev
69f831af0b
mdbx: refine lck-posix implementation.
2019-08-11 19:13:29 +03:00
Leonid Yuriev
036144eed4
mdbx-chk: fix false-positive 'wrong idl entry' error(s).
...
Исторически mdbx_env_info() получает информацию вне контекста
транзакции. Поэтому транзакция чтения, внутри которой проверяются записи
GC, может быть не последней. При этом в более новых транзакциях
последние страницы могут быть возвращены в пул нераспределенных с
уменьшением номера последней выделенной страницы. Тогда в проверяемом
снимке в записях GC могут быть номера страниц больше, чем возвращает
mdbx_env_info() в поле mi_last_pgno, что трактовалось в mdbx_chk как
ошибка.
Change-Id: I51ae102603e1eda77d6b6d511e2094410ab8c2c2
2019-08-11 16:49:15 +03:00
Leonid Yuriev
8917fb30bf
mdbx: make lck-wait ops breakable for linux/posix.
...
Change-Id: Ieb113f3c01bceced99b122988f93331d5619c2be
2019-08-11 12:22:41 +03:00
Leonid Yuriev
bf0e0382fc
mdbx: use O_DIRECT for db-copy.
...
Change-Id: Ib17fcdc2eba3382ed841a1e5e0a4f69f88c2491d
2019-08-11 01:14:52 +03:00
Leonid Yuriev
bdc77df921
mdbx: fix race-with-close for lck-posix.
...
Change-Id: Ie601ebbec8cc47d26935e12a57abe991aec1cb41
2019-08-11 00:07:21 +03:00
Leonid Yuriev
673f867e3c
mdbx: minor refine Linux lck-implementation.
...
Change-Id: Ib95398f8d86eb94fc55b506066f78eda4a29f4a8
2019-08-10 23:25:17 +03:00
Leonid Yuriev
c6369e68a3
mdbx: draft support for non-Linux POSIX-platforms (FreeBSD, MacOS, etc).
...
Change-Id: Iaee2dc31b134fe92fc67508d011835a60f3723e6
2019-08-10 23:24:31 +03:00
Leonid Yuriev
ce64c5aa37
mdbx: use OFD (open file) locks on Linux.
...
Change-Id: Id9718da28d4e367b0ff10976d2afaaf3d18122fb
2019-08-10 12:53:16 +03:00
Leonid Yuriev
a008b0b16f
mdbx: description of lck-implementation for Linux.
...
Change-Id: I8fe5f49a19e5cc61198ecd96dfe479d0e17c10a5
2019-08-09 21:36:02 +03:00
Leonid Yuriev
1798904cf4
mdbx: description of internal lck API.
...
Change-Id: Ic677ba62ca566409a44234a1c0d8b0b41158fe86
2019-08-09 21:34:19 +03:00
Leonid Yuriev
663f3f3c58
mdbx: conditionally use cacheflush() for linux < 2.6.11
...
Change-Id: Id34c67797e14f709f767bf1b687319cd2dfef874
2019-07-22 00:19:15 +03:00
Leonid Yuriev
a6bad26e1d
mdbx: rename/clarify flush_noncoherent_cpu_writeback().
...
Change-Id: I05a5df8d2a283159f449fc1e68a14d0a1861a714
2019-07-21 22:52:21 +03:00
Leonid Yuriev
f39044124e
mdbx: clarify/rework invalidate_mmap_noncoherent_cache() for MIPS.
...
Change-Id: I70c279c2ba67191c7cb93cd8875082eb9c8e58b7
2019-07-21 22:52:16 +03:00
Leonid Yuriev
0b8ac37450
mdbx: reduces number of getpid() calls for checking PID against fork().
...
PID check could be ommited:
- on Linux when madvise(MADV_DONTFORK) is available. i.e. after the fork()
mapped pages will not be available for child process.
- in Windows where fork() not available.
Change-Id: I4dd6bcb209cfc816ae3ec43825ea913d2249663c
2019-07-16 11:52:10 +03:00
Leonid Yuriev
4adb1ab2d8
mdbx: portability - rename lck-posix.c to lck-linux.c
...
Change-Id: I0ecee2b1a5d8e664eb795e5f5df2fa2d3cb73c83
2019-07-15 00:29:46 +03:00
Leonid Yuriev
2544a621e7
mdbx: portability - support for non-_GNU_SOURCE mode.
...
Change-Id: I9988d0ea8a9ddc06c799c65c4b2728bd17ff77e7
2019-07-14 15:13:43 +03:00
Leonid Yuriev
41f00485fd
mdbx: portability - allows operation without mremap().
...
Change-Id: I7fed42d51259e582e9dbc401c78f7f829a80f71c
2019-07-14 15:11:59 +03:00
Leonid Yuriev
97e4f66d16
mdbx: portability - support for musl libc.
...
Change-Id: Ida8a3bd9da896bc6c00bef931ddf3dce65bef8eb
2019-07-14 15:08:10 +03:00
Leonid Yuriev
cf7160bda2
mdbx: portability - don't include malloc.h
on BSD.
...
Change-Id: I67f580c073bfe52fbd2e4ff599354e6d0f597e95
2019-07-14 15:08:02 +03:00
Leonid Yuriev
097b274aa4
mdbx: portability - use C11 aligned_alloc().
...
Change-Id: I61819614ce355c8a2597c9b26997458b3d16081c
2019-07-14 15:07:54 +03:00
Leonid Yuriev
8f7ea1844b
mddx: portability - compatibility with BSD-style __assert().
...
Change-Id: Ic18f2de8a23597c62fab07041aeb62960e82c37a
2019-07-14 15:07:47 +03:00
Leonid Yuriev
b3286bad16
mdbx: portability - fix __dll_hidden/__hidden typo.
...
Change-Id: Iccd225d8c77eafdccc7f021809c26843974153e4
2019-07-14 15:07:16 +03:00
Leonid Yuriev
3ac2af61aa
mdbx: cleanup msvc-compat feature test defs.
...
Change-Id: I2c61bcecedc32beb3b0d70180da9e52cb7e6c9eb
2019-07-13 12:07:14 +03:00
Leonid Yuriev
eefbb7f063
mdbx: remove extra prep_backlog_data() inside update_gc().
...
Change-Id: Ic6250159c5abe03ed0705c7a432c5eb5b17b790e
2019-07-09 15:58:48 +03:00
Leonid Yuriev
4ecf78163d
mdbx: fix/refine mdbx_find_largest().
...
Change-Id: Ib40ca0014da18793be0bdae5133806304ad42819
2019-07-09 03:27:23 +03:00
Leonid Yuriev
53563e75bb
mdbx: fix DB-shrinking race with copy-asis & readers.
...
Change-Id: I1e05616de03d814850a1c8ad20e83941b2d1c911
2019-07-09 00:41:04 +03:00
Leonid Yuriev
bd5078347b
mdbx: refine backlog preparation inside update_gc().
...
Change-Id: Ib18842c2922afba794d6ab69337580bcea29bfe6
2019-07-09 00:41:04 +03:00
Leonid Yuriev
06f16464aa
mdbx-test: adds more jitter while DB opening.
...
Change-Id: Ic0f03f4fbe064ea00f719baa11b28cc24aafcb5b
2019-07-07 21:21:54 +03:00
Leonid Yuriev
1f89c494ff
mdbx: refines OFF_T_MAX if it is not defined.
...
Change-Id: Ic453140e01725493cad0c98e73244c747d5f490e
2019-07-07 20:04:39 +03:00
Leonid Yuriev
8606803344
mdbx: adds paranoid mvcc-checks into read transactions.
...
Change-Id: I7f0f05010306b02b3b1ab8478217de70ffd211a0
2019-07-07 19:51:06 +03:00
Leonid Yuriev
41de36e93d
mdbx: avoids infinite copy_file_range-loop when file is unexpectedly truncated.
...
Change-Id: I5a542a49fa4ac9ced8ca60266a084d52d3618804
2019-07-07 18:42:14 +03:00
Leonid Yuriev
7e1e142104
mdbx-chk: fix/refine error handling for sub-DBs.
...
Change-Id: I42460793bbe47815add1b3f61f3746f671a749d9
2019-07-07 01:47:10 +03:00
Leonid Yuriev
e2f37908b9
mdbx: fix/refine error handling while DB-pages walking.
...
Change-Id: If910e96cc7c30577531aab24b5a9573e5fe9126d
2019-07-06 21:25:11 +03:00
Leonid Yuriev
40112ebd62
mdbx: engage copy_file_range() for env_copy_as_is.
...
Change-Id: I7ea17914d80500ffa70451b80920d726f0e9c2f8
2019-07-01 18:37:36 +03:00
Leonid Yuriev
6960c45e59
mdbx: avoids EFAULT "Bad address" while copy-as-is if DB is swapped-out from RAM.
...
Change-Id: I711efc1c54a04745bd561bc5e1db5e6f6d8b7115
2019-07-01 17:55:58 +03:00
Leonid Yuriev
2e60256978
mdbx: drop EPIPE/SIGPIPE handling (since pipes are disallowed).
...
Change-Id: I56d4539333edea93cc1a2c3606cf959c82b98b19
2019-07-01 16:39:18 +03:00
Leonid Yuriev
38110579ba
mdbx: drops mdbx_write(), using mdbx_pwrite() instead of.
...
Change-Id: Iff3de2d5ef3fa2e92607d46b96d4526e464e593b
2019-07-01 16:39:18 +03:00
Leonid Yuriev
5b88fe819c
mdbx: fix pwrite() for WRITE_MAX.
...
Change-Id: If4924d20c1e267c2d3a190c860b89fc2fda0d517
2019-06-24 02:14:50 +03:00
Leonid Yuriev
cf004dddbc
mdbx: use single cursor instance inside mdbx_env_walk().
...
Change-Id: I72cade64468a42fd27ebb4955d71ecbbabe64987
2019-06-24 02:14:50 +03:00
Leonid Yuriev
728f98d3de
mdbx-check: refine leaf-pages info (cosmetics).
...
Change-Id: I0fdb467f1c1d51bfcdcef5edfe99c8e9ad66037e
2019-06-23 14:26:11 +03:00
Leonid Yuriev
bbf8ef0a4b
mdbx-chk: fix space-usage statistics info.
...
Change-Id: I0cbbbc481f2e6dc37b29f6603ec1ead43b5d1864
2019-06-23 14:07:13 +03:00
Leonid Yuriev
05cf301774
mdbx: bump version to v0.3.0
...
Change-Id: Ic09361eda834c75d4fdb37dcbe5e8edbf0317f9b
2019-06-22 22:23:25 +03:00
Leonid Yuriev
47beba1782
mdbx: more 'unlikely'.
...
Change-Id: I472e4a922590cd4680a48416611cfd894fa120db
2019-06-22 22:23:17 +03:00
Leonid Yuriev
e3f8dc5501
mdbx: rework RECLAIMING inside update_gc().
...
Change-Id: I9cf592476780bfdb346472baa12497d68a3d5aad
2019-06-22 22:23:17 +03:00
Leonid Yuriev
be0ec1d38d
mdbx: fix GC corruption due deep recursive rebalance from update_gc().
...
Change-Id: I810250deb25cd625e737000282b434e3158ef8cc
2019-06-22 02:00:47 +03:00
Leonid Yuriev
eecec74e21
mdbx: more unlikely
(minor).
...
Change-Id: Id6139473b3e6a7c3f099acc64db3180448294d0a
2019-06-21 02:11:28 +03:00
Leonid Yuriev
52bc4a7f41
mdbx-check: minor refine to avoid deeply recursion.
...
Change-Id: I67f83a232ef47899f43c242b7e6295de4d7ec909
2019-06-20 21:08:31 +03:00
Leonid Yuriev
49d0e872a1
mdbx: iterate & check before recursion inside mdbx_env_pgwalk().
...
Change-Id: I27058a33f6dece0c3f206283a42ff74e5727417f
2019-06-20 21:04:47 +03:00
Leonid Yuriev
c91cc85c1f
mdbx-chk: log sub-DBs when verbose > 0 (cosmetic).
...
Change-Id: Ie73c0773929b51eb11fb02afe18bb01b59fb2612
2019-06-20 10:12:26 +03:00
Leonid Yuriev
cd75c4f081
mdbx-chk: avoid continuing to check bad records.
...
Change-Id: I03b9d425c8413d6cacc1b67ed4a8253a10a9d603
2019-06-20 00:52:00 +03:00
Leonid Yuriev
2bea60a1a4
mdbx-chk: avoid infinite loop/recursion while checking corrupted DB.
...
Change-Id: I3edb053e4baedced8ce8e8cfa25f9851eaca35d1
2019-06-19 15:08:50 +03:00
Leonid Yuriev
c05702eacf
mdbx: add MDBX_PGWALK-tags and refine pgwalk internals.
...
Change-Id: I1f4eb79463dc6eec3d94d43baab0b28ceefa8c03
2019-06-19 15:05:10 +03:00
Leonid Yuriev
ce0e5d67f5
mdbx-tools: avoid output NaN from mdbx_chk for empty tables.
...
Change-Id: Ie1ff87da3a5e5e124eac1dafd7d5b456f8bde6e3
2019-06-10 13:28:31 +03:00
Leonid Yuriev
b443477869
mdbx: workaround for Coverity Scan.
...
Change-Id: I0e2d22bbbd38ac7978fb8879219ded79a5be1b0a
2019-05-28 21:19:54 +03:00
Leonid Yuriev
870c2a6f9c
mdbx: symmetrical/invariant mdbx_estimate_range() for MDBX_EPSILON order.
...
Change-Id: Ida7e07d6429576c457bcd4d877a3c38c88dc2771
2019-05-26 00:59:35 +03:00
Leonid Yuriev
e26b7501eb
mdbx: add MDBX_EPSILON support for mdbx_estimate_range().
...
Change-Id: I2d89a9f20bfa16c8f35a4381709bc54f86f0ff67
2019-05-25 19:10:38 +03:00
Leonid Yuriev
b4002a8484
libmdbx: fix TAGRET typo (minor).
...
Change-Id: Iffafbed7fdad3492aeb51f17caf8109a5b3e35c0
2019-05-02 16:46:05 +03:00
Leonid Yuriev
6e3725457d
mdbx: fix minor comment typo.
...
Change-Id: I56a465e820a49d13c49fb3bd05add970b0eebb14
2019-03-14 00:13:13 +03:00
Leo Yuriev
73f8839a97
mdbx: minor refine/clarify estimation internals.
2019-03-06 16:45:49 +03:00
Leo Yuriev
501eb8c6ad
mdbx: more __hot/__cold attributes for functions.
2019-03-06 16:45:01 +03:00
Leo Yuriev
ee899a21ed
mdbx: treat pagesize == 0/INTPTR_MAX as aliases for MIN_PAGESIZE/MAX_PAGESIZE.
2019-03-05 17:55:33 +03:00
Leo Yuriev
3535e7a6d6
mdbx: returns as-is (i.e. negative) the estimation results for an inverted ranges.
2019-03-05 15:50:45 +03:00
Leonid Yuriev
8ddfd1f34a
mdbx: adds functions for distance/move/range estimation (initial).
...
Change-Id: If59eccf7311123ab6384c4b93f9b1fed5a0a10d1
2019-03-05 02:57:15 +03:00
Leo Yuriev
7d383350e8
mdbx: workaround for musl-libc __assert_fail() prototype bug.
2019-03-04 14:41:50 +03:00
Leo Yuriev
9ffd17d58b
mdbx: refine mdbx_filesync() to avoid hide fdatasync() error.
2019-03-04 13:53:05 +03:00
Leo Yuriev
9f410597df
mdbx: checking only _POSIX_SYNCHRONIZED_IO for fdatasync (musl).
2019-03-04 13:39:33 +03:00
Leo Yuriev
cca2c91058
mdbx: don't check __GLIBC_PREREQ/_BSD_SOURCE/_XOPEN_SOURCE for use fsync (musl).
2019-03-04 13:34:38 +03:00
Leo Yuriev
46b551e386
mdbx: add in-source definition for _POSIX_C_SOURCE and _XOPEN_SOURCE (musl).
2019-03-04 13:33:27 +03:00
Leonid Yuriev
14ae9fb2a1
mdbx: env_set_geometry() treat zero-values also as defaults.
...
Change-Id: If8c6f7d7bbeffe71ae4e28f27184103dd1da257b
2019-03-02 14:26:09 +03:00
Leonid Yuriev
01797cf1bc
mdbx: env_open() consider zero mode_t as open-existing flag.
...
Change-Id: I6f9dbf2059822afaba4c3de8f4ce380613a7dc36
2019-03-02 13:31:08 +03:00
Leonid Yuriev
7617cce0c6
mdbx-tools: fix Coverity warning (paranoia).
...
Change-Id: I3ff33a9eb2c58fe601566fd4101f9c95d76d29de
2019-02-27 23:26:15 +03:00
Leo Yuriev
44a067283a
mdbx: fix comment typo (minor).
2019-02-12 13:39:16 +03:00
Leonid Yuriev
49fa9b9c35
mdbx: fix handling MDBX_APPENDDUP mode.
...
Change-Id: I36de2a8dcab5126dab3857a7840ab3904a1d19c8
2019-02-04 01:41:11 +03:00
Leonid Yuriev
0639f54280
mdbx-test: add 'append' testcase.
...
Change-Id: I71620ea1a019e16b8e3d84a81dcc042961eae5b5
2019-02-04 01:41:11 +03:00
Leonid Yuriev
73bef80347
mdbx-check: add checking for complete duplicates.
...
Change-Id: I8308b725418ef69188eeadfc656dead4ce9cee27
2019-02-04 01:32:15 +03:00
Leonid Yuriev
460751bc01
mdbx-chk: add '-i' option for custom comparators.
...
Change-Id: Ie3d7fdb3c3a881a484d351ca9a3160eb467b43b9
2019-02-04 01:32:15 +03:00
Leo Yuriev
309955be75
mdbx-load: add '-a' option for loading dumps of custom-sorted DBs.
...
Based on http://www.openldap.org/devel/gitweb.cgi?p=openldap.git;a=commitdiff;h=aa77c832b8e6fc696078017f550d119cdfc0f232
Change-Id: If7de71c8f6ffc29d4316c6074995fab38f2c1b4b
+load
Change-Id: Iff6cbca2514840ee290f801e3b273edf160913b4
2019-02-04 00:06:39 +03:00
Leo Yuriev
9ba8434c1d
mdbx: fix __ANDROID__ typo.
...
Thank to Howard Chu <hyc@openldap.org>.
Change-Id: Ibcbe2e4790a5df5758d9fd6c621793ea42a94682
2019-02-03 17:53:00 +03:00
Howard Chu
bfffaa66b8
mdbx: import - tweak mdb_page_split (ITS#8969).
...
Bump up number of keys for which we use fine-grained splitpoint search
Change-Id: Icca2e1953cbcd6898b790f657636c2195b397790
2019-02-03 13:07:17 +03:00
Leo Yuriev
9cc9116df3
mdbx: 2019 HNY.
...
Change-Id: Iec6b7affedef0ea89fad917eb17af7e8201a7482
2019-02-03 12:28:01 +03:00
Leonid Yuriev
08508d34b3
mdbx: MDBX_BAD_DBI instead of MDBX_NOTFOUND in case table was dropped.
...
Change-Id: I2894a5721d2be2bb982e7c7a607c6a0413f7e3ca
2019-01-27 00:17:57 +03:00
Leonid Yuriev
5fd05db6ea
mdbx: minor fix/refine mdbx_txn_straggler() for r/w-txn.
...
Change-Id: Id44a1db414de457d74a3e1d9d5c96064a7278080
2019-01-17 23:14:25 +03:00
Leonid Yuriev
4708e0cf79
mdbx-winfdows: fix returning negative value on failure.
...
Change-Id: Iaf5fb1f0cbcc3c14e2d3edf1f57538ecc0dfdf00
2019-01-17 23:10:04 +03:00
Leonid Yuriev
624968b74c
mdbx-windows: use SetFileInformationByHandle() when available.
...
Change-Id: I27d9d4271d4328947ad68cdf30af61a31978b4f9
2018-12-28 13:53:57 +03:00
Leonid Yuriev
f778f4a795
mdbx: add MDBX_SAFE4QEMU option for testing under QEMU.
...
Change-Id: Ide674e0125e2746f73a7ba44828316a60633e887
2018-11-26 19:08:30 +03:00
Leo Yuriev
f55e1ec5cc
mdbx-windows: more safety/robustness for DB shriking.
2018-11-22 17:50:49 +03:00
Leo Yuriev
35f95e8ca2
mdbx-windows: always susppend local threads while resize DB (workaround for Windows kernel bug).
...
We should not concern about performance on Windows platform,
it just unreasonable. Therefore just always suspend the local
threads to avoid this issue.
This resolves https://github.com/leo-yuriev/libmdbx/issues/48
2018-11-22 14:19:49 +03:00
Leonid Yuriev
ee7ebe438c
mdbx: fix AddressSanitizer issue for mdbx_page_loose (minor, not a bug).
...
Change-Id: I0e550dabdeda92759c28d4566104ff07a92d83bb
2018-11-22 02:52:25 +03:00
Leonid Yuriev
f626acb398
mdbx: relax DBI-sequences for concurrent open DBI-handles for present tables.
...
Change-Id: I7f07d2e716074bd9c2847aeb062e366f46cca214
2018-11-19 13:31:44 +03:00
Leo Yuriev
eda424ff71
mdbx: rename __always_inline.
2018-11-06 21:08:28 +03:00
Leonid Yuriev
d5320d9252
mdbx: silently put mm_geo.now into [geo.lower...geo.upper] boundaries.
...
Copy-with-compaction by previous version of libmfbx could produce
DB-file less than meta.geo.lower bound, in case actual filling
is low or no data at all.
This is not a problem as there is no damage or loss of data.
Therefore it is better not to consider such situation as an
error, but silently correct it.
Change-Id: Ia662656cc3584c07efcfbdfc80f80e3c76e6dd59
2018-11-05 14:34:12 +03:00
Leonid Yuriev
3c684010e3
mdbx-tools: fix minor MSVC warnings.
...
Change-Id: If8b042e2d84bfed7f8b0a81a4d75d7be7e7aa7a9
2018-11-05 00:31:58 +03:00
Leonid Yuriev
aa52cb395f
mdbx: fix typo in mdbx_limits_dbsize_max().
...
Change-Id: Ie55e3ca108ac6aab9a41d65f316a3d5ff5ff6f1f
2018-11-05 00:18:41 +03:00
Leonid Yuriev
2770e193b6
mdbx: take in account shrink/growing thresholds while copy-with-compactification.
...
Change-Id: Id93e62089819dfcc8cbc83620e0bdd806d8c1950
2018-11-04 20:34:16 +03:00
Leonid Yuriev
83f1effff1
mdbx: refine mdbx_env_copy() internals.
...
Change-Id: I9e8f0dc87398564524a5ec98eda2cb9bde100909
2018-11-04 20:34:16 +03:00
Leonid Yuriev
629637d95e
mdbx-osal: add mdbx_fseek().
...
Change-Id: I5744aa3ba51bd1acaeedd866e6b21a1330c3f711
2018-11-04 20:34:16 +03:00
Leo Yuriev
06cb8b45b2
mdbx: fix PRIuPTR/PRIu64 for 32-bit builds.
...
Change-Id: Ic6462666de666840bc77e0e50fd0d8cd36a125b7
2018-11-04 20:34:16 +03:00
Leonid Yuriev
2d5cba61ed
mdbx: fix assertion.
...
Change-Id: Ib0f19394c42f810f74e3889c21f62ae40ec0f2ea
2018-10-21 21:34:08 +03:00
Leonid Yuriev
124c5a6751
mdbx: fix mdbx_txn_abort().
...
This resolves https://github.com/leo-yuriev/libfpta/issues/20
2018-10-21 20:27:49 +03:00
Leonid Yuriev
3bae0723b7
mdbx: refine mdbx_mutex_failed().
2018-10-21 20:27:49 +03:00
Leonid Yuriev
5400ef6512
mdbx-windows: fix mdbx_assert_fail().
2018-10-21 20:27:49 +03:00
Leonid Yuriev
718f997502
mdbx-windows: workaround for Windows10 bugs.
...
This resolves https://github.com/leo-yuriev/libmdbx/issues/47
2018-10-21 20:27:49 +03:00
Leonid Yuriev
c2f850b566
mdbx-windows: STATIC_ASSERTs for atomic ops.
...
Change-Id: I9797eece26db54e5f4a19f82d004ff18bdc138d6
2018-10-21 20:27:34 +03:00
Leonid Yuriev
f93cca3d14
mdbx-windows: minor simplify MDBX_srwlock.
...
Change-Id: I1db8e7dab2a3c764fdbe64923cfaab238eacc77e
2018-10-21 20:27:05 +03:00
Leonid Yuriev
ecf214ca04
mdbx-windows: add MDBX_AVOID_CRT.
...
Change-Id: I08233d777b318037372ec250c754f093b3047c94
2018-10-19 15:16:33 +03:00
Leonid Yuriev
06e39e2728
mdbx: fix mdbx_dbi_sequence().
...
Change-Id: Ic620896ef42c1c2d85c07c146b72e773ab43a67d
2018-10-19 13:33:54 +03:00
Leonid Yuriev
3c4e9443ae
mdbx: allow devel-signatures (for Miranga-NG).
...
Binary format of v0.1.x and v0.2.x is frozed.
This commit allows to open DBs created early by devel-versions of libmdbx.
It seems to be required for Miranda-NG users, but no one else.
Change-Id: Icf1d0477dcc3d212e03c87ab8c5255c3382425e5
2018-10-15 12:30:24 +03:00
Leonid Yuriev
d2bfb2e489
mdbx: allow pre-define mdbx_malloc/mdbx_free macros.
...
Related to https://github.com/leo-yuriev/libmdbx/issues/43#issuecomment-429625047
Change-Id: Icaee4ba62003e6eacef9f938bdea19426623b5da
2018-10-14 19:06:42 +03:00
Leonid Yuriev
30a80ff07c
mdbx: re-enable usage of lck-file in MDBX_EXCLUSIVE mode.
...
Otherwise we should prohibit running read-only and write
transactions simultaneously, but no reliable way to do this.
Change-Id: I8805f10b37ffcddb612d869309b1cd5e04cfcc1e
2018-10-14 18:15:26 +03:00
Leonid Yuriev
582adda628
mdbx-windows: fix mdbx_strdup() usage.
...
Fix commit e229dbe9dca1ff117a714007cc3811c01ba98b8b (12 of 17 for https://github.com/leo-yuriev/libmdbx/issues/43 ).
Change-Id: Ic63864d736319ccba37518a50590f4e21282a451
2018-10-14 17:36:15 +03:00
Leonid Yuriev
ae83982811
mdbx-windows: setup DllMain() as entry and don't linking with CRT.
...
17 of 17 for https://github.com/leo-yuriev/libmdbx/issues/43
Change-Id: Ie3b37633ab081ca4ba2dc485e67de96df032a3df
2018-10-14 15:03:52 +03:00
Leonid Yuriev
25ab7da33e
mdbx-windows: _NO_CRT_STDIO_INLINE to avoid dependency from CRT.
...
16 of 17 for https://github.com/leo-yuriev/libmdbx/issues/43
Change-Id: Ie5d33e2a4f1fd281a28eaa6686aaf921ecc956b4
2018-10-14 15:03:38 +03:00
Leonid Yuriev
96491db229
mdbx-windows: building and linking mdbx_ntdll_extra.lib
...
15 of 17 for https://github.com/leo-yuriev/libmdbx/issues/43
Change-Id: I6241d08f14dcd59c6c55aa26660bdec233fb3c94
2018-10-14 15:03:17 +03:00
Leonid Yuriev
d520df6a13
mdbx-windows: add ntdll.def for building ntdll.lib
...
14 of 17 for https://github.com/leo-yuriev/libmdbx/issues/43
Change-Id: I492b4be913f0a14540e7a80b53c2a24623dfeb07
2018-10-14 15:01:15 +03:00
Leonid Yuriev
cad9cea33b
mdbx-windows: use _wcsnicmp() instead of wcsnicmp() to avoid dependency from CRT.
...
13 of 17 for https://github.com/leo-yuriev/libmdbx/issues/43
Change-Id: I880433ddaf364a7e2b5de104ccf8689b93754ec5
2018-10-14 15:00:43 +03:00
Leonid Yuriev
e229dbe9dc
mdbx-windows: add mdbx_strdup() to avoid dependency from CRT.
...
12 of 17 for https://github.com/leo-yuriev/libmdbx/issues/43
Change-Id: Ib1379d75dc25e34f56daf8988848c41f59b6cd6b
2018-10-14 15:00:16 +03:00
Leonid Yuriev
b47badb3ee
mdbx-windows: rework mdbx_memalign_alloc()/mdbx_memalign_free() to avoid dependency from CRT.
...
11 of 17 for https://github.com/leo-yuriev/libmdbx/issues/43
Change-Id: Id1a76f88588251cab9a93aa9753021b30159b09a
2018-10-14 14:59:37 +03:00
Leonid Yuriev
f49741b4f8
mdbx-windows: refine mdbx_vasprintf() to avoid dependency from CRT.
...
10 of 17 for https://github.com/leo-yuriev/libmdbx/issues/43
Change-Id: I95c4583c27503eb4e9221b212b34474dfb561e6d
2018-10-14 14:59:09 +03:00
Leonid Yuriev
80ccb31008
mdbx-windows: avoid use strerror() from CRT.
...
9 of 17 for https://github.com/leo-yuriev/libmdbx/issues/43
Change-Id: I53b770e911ff8e7d4e084a323a374d09ea516986
2018-10-14 14:58:30 +03:00
Leonid Yuriev
4dea5c2719
mdbx-windows: use _snprintf() and _vsnprintf() to avoid dependency from CRT.
...
8 of 17 for https://github.com/leo-yuriev/libmdbx/issues/43
Change-Id: I335a12344b0f0d63462ac4195fafdb60f981f182
2018-10-14 14:57:34 +03:00
Leonid Yuriev
ded5269937
mdbx-windows: rework mdbx_assert_fail() and mdbx_panic() to avoid dependency from CRT.
...
7 of 17 for https://github.com/leo-yuriev/libmdbx/issues/43
Change-Id: I40dc8d6a7d1d955c13c7d328ee904f0e6f30b248
2018-10-14 14:57:03 +03:00
Leonid Yuriev
ae2875e248
mdbx: avoid on-stack allocation/chkstk inside mdbx_check4nonlocal().
...
6 of 17 for https://github.com/leo-yuriev/libmdbx/issues/43
Change-Id: Ib55a27c4859ff25e5b779a4514cd2e625ab99013
2018-10-14 14:56:32 +03:00
Leonid Yuriev
aa64597e8b
mdbx: avoid on-stack allocation/chkstk inside mdbx_env_walk().
...
5 of 17 for https://github.com/leo-yuriev/libmdbx/issues/43
Change-Id: Iadb833ff38dbd0922eda69238b365f5906b9109f
2018-10-14 14:56:04 +03:00
Leonid Yuriev
180c605cac
mdbx: avoid on-stack allocation/chkstk inside mdbx_reader_check0().
...
4 of 17 for https://github.com/leo-yuriev/libmdbx/issues/43
Change-Id: I31a8396ccc5db32cbd1816593861d2ee4325d09f
2018-10-14 14:55:30 +03:00
Leonid Yuriev
23d2f0fbb5
mdbx: avoid on-stack allocation/chkstk inside mdbx_kill_page().
...
3 of 17 for https://github.com/leo-yuriev/libmdbx/issues/43
Change-Id: Icff2d67f84283820fb21932c0d439d645c634d25
2018-10-14 14:54:39 +03:00
Leonid Yuriev
9fae7f92d6
mdbx-windows: use LocalAlloc/LocalFree instead of CRT's malloc/free.
...
2 of 17 for https://github.com/leo-yuriev/libmdbx/issues/43
Change-Id: Icb5289b55897d52ac00007f30b36bd84e5a0cbd1
2018-10-14 14:53:57 +03:00
Leonid Yuriev
ace3d1bfa3
mdbx: add mdbx_malloc/mdbx_free, etc.
...
1 of 17 for https://github.com/leo-yuriev/libmdbx/issues/43
Change-Id: Ia5204be9f943fefde42e6a46e652c1be6ab6a96b
2018-10-14 14:53:40 +03:00
Leonid Yuriev
777d1db5c9
mdbx-windows: add MDBX_BUILD_DLL and DllMain().
...
Change-Id: I715f5ea84fe77923eecbc617c4e994e3e5d44605
2018-10-08 02:19:58 +03:00
Leonid Yuriev
c9e3dc373b
mdbx-windows: more for WindowsXP support.
...
Change-Id: Ide34048720989fc010f48e086569e12e8c1edca1
2018-10-08 02:18:32 +03:00
Leonid Yuriev
83f3d820f1
mdbx-windows: refine debug-logging.
2018-10-08 02:17:27 +03:00
Leo Yuriev
0f82db941b
mdbx: add error-logging to mdbx_page_get().
...
Change-Id: I6a1a95ec6fc73aa7bf28875a89b1dd6c02ef5164
2018-10-08 02:14:12 +03:00
Leonid Yuriev
7a3c8743f3
mdbx: fix use _ASSERTE.
...
Change-Id: Iba139ddcfc6cbc93b74f3d7387492b6ae6496dcc
2018-10-08 02:14:12 +03:00
Leo Yuriev
025cf0b00e
mdbx: minor fix mdbx_updage_gc().
...
Change-Id: Ie6bc38e86837ab0863c60500dce0c965e447b209
2018-10-01 18:11:24 +03:00
Leonid Yuriev
0b870648af
mdbx-chk: use txnid as record-number for GC.
2018-09-23 12:04:10 +03:00
Leonid Yuriev
2ff1096c49
mdbx: refine mdbx_update_gc().
2018-09-23 12:03:45 +03:00
Leonid Yuriev
cd1b9ea1cf
mdbx: fix and simplify lifo-cleanup-loop inside update_gc().
2018-09-21 02:36:35 +03:00
Leonid Yuriev
d6c954cd43
mdbx: remove txnid/me_oldest asserts.
...
The `mc->mc_txn->mt_txnid >= *mc->mc_txn->mt_env->me_oldest` assertion may fail
false-positive, becase me_oldest may be not updated in read-only or exclusive modes.
Change-Id: Iad57a38efa30bc9fe2392ac24657727a7ce1f584
2018-09-20 12:29:53 +03:00
Leonid Yuriev
0b4c957bd5
mdbx: fix mdbx_find_oldest() for exclusive mode.
...
Change-Id: I41283bcf0bd22797530c74df125bf94cd3e73d00
2018-09-20 00:05:36 +03:00
Leonid Yuriev
e73df34619
mdbx: fix Coverity warnings (minor).
...
Change-Id: I4fa312f3a943f20e771f5149b2d8ad7c2520bb0e
2018-09-19 22:04:34 +03:00
Leonid Yuriev
f7bd98a4ce
mdbx-chk: allow gap for GC's PNL upto one page.
...
Change-Id: Ie051442947e7588b868cec35ef9374368bf8a1c4
2018-09-19 17:06:56 +03:00
Leonid Yuriev
82c975e174
mdbx: rework/fix cursor tracking inside mdbx_update_gc().
...
Change-Id: I2c320f63901a011992bc912938bc65084f63636b
2018-09-19 17:06:27 +03:00
Leonid Yuriev
4117c9f111
mdbx: move macros/inlines to fix Windows builds.
...
Change-Id: I48aaf6b77466bb8b13294b84de73fb6063c88190
2018-09-19 00:24:49 +03:00
Leonid Yuriev
b52e878c4f
mdbx-chk: allow gap for GC's PNL upto half of page.
...
Change-Id: I6d6d68d1124c336f8356435eba02cb66a08c4e9c
2018-09-19 00:07:39 +03:00
Leonid Yuriev
c4e1c2b488
mdbx: refine assections (minor).
...
Change-Id: Ic924988b8ce043d6106df381c996dd2c8ff9ca1f
2018-09-19 00:07:39 +03:00
Leonid Yuriev
60bba72aa1
mdbx: re-define assert macro via mdbx_assert.
...
Change-Id: I317801ba4200bdf1aa5cacf75d21a8e633fbc48a
2018-09-19 00:07:39 +03:00
Leonid Yuriev
8e8b40e7a2
mdbx: fix update_gc() assertion.
...
Change-Id: I433382de0ddab41ad1530ee674ed22f9003c2779
2018-09-19 00:07:39 +03:00
Leonid Yuriev
ab5668cf29
mdbx: add MDBX_FORCE_ASSERT.
...
Change-Id: I68a9f7b42663ea157c7c0a5a58797c94127b45ed
2018-09-19 00:07:39 +03:00
Leonid Yuriev
d6d03639a2
mdbx: one more fix/refine mdbx_update_gc().
...
Change-Id: I408db79aafb317ad20e8473edc1bc30c3afb6ea9
2018-09-19 00:07:39 +03:00
Leonid Yuriev
c287f88dbd
mdbx: fix update_gc() for rare case when no reclaiming was made before.
...
Change-Id: Ib84da8ad26f9ef538dce2472c9ee89918bf6e25a
2018-09-17 15:25:45 +03:00
Leonid Yuriev
68fd9c9908
mdbx: add mdbx_get2() for testing.
...
Change-Id: Icd0961e464936fa2d24fd3ed87b61de038e955c2
2018-09-17 15:25:45 +03:00
Leonid Yuriev
940138fbda
mdbx: rework prefer_max_scatter inside mdbx_update_gc().
...
Change-Id: I6deceb73f8578d9306528e0204ba0895781057fe
2018-09-17 15:25:45 +03:00