302 Commits

Author SHA1 Message Date
Leo Yuriev
59ad929d36 mdbx-windows: fix and refine mdbx_suspend_threads_before_remap().
Change-Id: I4f289f5d603ca18e6714455604dd4ce98931af41
2018-01-08 18:19:25 +03:00
Leo Yuriev
30bd7d3078 mdbx: shrinking memory-mapping for Windows (initial).
Change-Id: I3c3c2df0747c788ea36d7764c1e8139098ca62be
2018-01-08 17:47:41 +03:00
Leo Yuriev
f10f5b376f mdbx: account freelist-backlog while shrinking DB.
Change-Id: I8b211f281483e7cb6344ef99c571f3516d16f61d
2018-01-07 22:31:34 +03:00
Leonid Yuriev
7812476518 mdbx: fix readonly mapping for Windows.
Change-Id: Ie301d7af74ff91e802aa78af8cfb329f587137ee
2018-01-07 17:08:47 +03:00
Leonid Yuriev
d14ca5cc4f mdbx: fix _InterlockedExchangeAdd64 for some 32-bit SDKs.
Change-Id: I18280e8ef6432b9db3c5073fd59eaa102462f98d
2018-01-07 14:35:47 +03:00
Leo Yuriev
897d4dbf87 mdbx: fix growth memory-mapping on Windows.
This resolves https://github.com/leo-yuriev/libmdbx/issues/22

Change-Id: I25c2e65d9f68da8012ee097d3ad579cd548f2e09
2018-01-07 14:31:29 +03:00
Leo Yuriev
91a9d4d916 mdbx: more ntpapi for Windows.
Change-Id: I616b09502302be9e3017db7e99cf4dcf8697f32f
2018-01-07 14:22:17 +03:00
Leo Yuriev
24a8bdec49 mdbx: fix SIGSEGV in case mdbx_env_close_ex() called without mdbx_env_open(). 2017-12-20 14:22:55 +03:00
Leo Yuriev
3e9308eb0e mdbx: check for running write-txn inside mdbx_env_close(). 2017-12-19 16:38:21 +03:00
Leo Yuriev
b1c7fa30c0 mdbx: fix MDBX_BUSY comment/description (typo). 2017-12-19 16:37:20 +03:00
Leo Yuriev
96a0647253 mdbx-windows: fix mmap-resize (add MEM_RESERVE afrer NtExtendSection). 2017-12-19 16:07:30 +03:00
Leo Yuriev
8008e23cfa mdbx-windows: minor fix for legacy Windows SDK. 2017-12-19 16:07:25 +03:00
Leo Yuriev
a5b077b2f0 mdbx: minor clarify mdbx_env_set_geometry(). 2017-12-19 15:33:25 +03:00
Leo Yuriev
46a3d4e0a3 mdbx: fix assertion (minor, not a malfunction).
The `env->me_sync_pending` could be zero
when `mdbx_sync_locked()` called from `mdbx_env_set_geometry()`.

Therefore `mdbx_assert(env, !META_IS_STEADY(head) || env->me_sync_pending != 0)` at the top of `mdbx_sync_locked()`
could be trigger assertion failure.
2017-12-18 14:39:41 +03:00
Leo Yuriev
fc1bbf3a4b mdbx: disable 'unreachable code' for MSVC.
Change-Id: I4f9887b557885cb9a3829d19a56d332c76656cf8
2017-10-29 03:23:39 +03:00
Leo Yuriev
866ca18970 mdbx: add few __fallthrough and __unreachable.
Change-Id: Ife18986a3a6391c76f63d12f8102bd6670ae63eb
2017-10-29 02:12:05 +03:00
Leo Yuriev
aec2445161 mdbx: rework '_noop' and related macros.
Change-Id: Ic9ff3662a6abeb64aa0816e448007dd524794b1e
2017-10-29 02:12:05 +03:00
Leo Yuriev
db4ab61a0c mdbx: drop '__packed'.
Change-Id: Idf3e510733adb2b12b94fe1dcd22f76e02df955b
2017-10-29 00:59:11 +03:00
Leo Yuriev
6f6b360aba mdbx: add/fix 'fallthrough' for GCC 7.x
Change-Id: I45c57ea910978aaa857086d7794ad92ba0ae7157
2017-10-28 11:45:04 +03:00
Leo Yuriev
d1f04656ab mdbx: more robustness for thread checking while reset/renew/abort of txn. 2017-10-27 18:01:32 +03:00
Leo Yuriev
d4bf0a3332 mdbx: refine/simplify mdbx_find_oldest().
Simplify b6f14780e381300beaf782fa74252b791aae082e
2017-10-27 15:43:06 +03:00
Leo Yuriev
1a27e40701 mdbx: Merge branch 'fix-after-txntry'. 2017-10-27 14:17:43 +03:00
Leo Yuriev
b6f14780e3 mdbx: fix performance degradation in the absence of readers.
Change-Id: I59a51b61918463e68d3e0490c715f4dcc9ecb788
2017-10-27 13:36:10 +03:00
Leo Yuriev
0a7a290d06 mdbx: drop mdbx_txn_trylock(). 2017-10-26 21:49:39 +03:00
Leo Yuriev
5e1721efdd mdbx: fix mdbx_robust_trylock(). 2017-10-26 21:49:38 +03:00
Leo Yuriev
17b8e48bf4 mdbx: cleanup after last pull-request.
Cleanup after 4e40af60e74143aedaa8d295f0f33a3c892a1c9b (Merge pull request #20 from rouzier/feature/txn_try).
2017-10-26 21:49:38 +03:00
James Rouzier
7c466e53f0 Add the ability to not block when opening a write transaction 2017-10-25 19:41:28 -04:00
Leo Yuriev
4f1c846437 mdbx: rollback to not-a-weak instead to steady. 2017-10-10 18:14:07 +03:00
Leo Yuriev
b7121d7711 mdbx: fix meta.mm_psize typecast. 2017-10-09 17:41:13 +03:00
Leo Yuriev
9fd7056b4f mdbx: fix loose/dirty bug.
Change-Id: I725b640cfc29e1c0710abb155e05d44bb7bb3cc3
2017-10-05 09:01:19 +03:00
Leo Yuriev
f4ca6ed6b9 mdbx: fix handling MAX_MAPSIZE32 limit. 2017-10-02 18:01:08 +03:00
Leo Yuriev
2ce817b438 mdbx: ensure checks to avoid using meta-pages.
Change-Id: I21959b8a26961bb65f3bc3b87b24a3c4f6a673f7
2017-09-26 20:13:43 +03:00
Leo Yuriev
dc31d7d1a3 mdbx: fix shrinking below a lower-bound.
Change-Id: Ia6d497e2d7c6d7ee646b23b8df944a01d96445fc
2017-09-26 19:37:34 +03:00
Leo Yuriev
6a2ce93f19 mdbx: minor simplify mdbx_dbi_open_ex().
Simplify prev commit.

Change-Id: Id6a5abd6b18ceefae4cf259935bd6d9d9adb7d76
2017-09-07 09:52:53 +03:00
Leo Yuriev
5b23d7e452 mdbx: fix mdbx_dbi_open_ex(MDBX_CREATE) for rdonly txn.
Fix https://github.com/leo-yuriev/libmdbx/issues/19

Change-Id: I3ae1ab3188482fd8c31de51d62e34591082cd60a
2017-09-07 09:43:44 +03:00
Leo Yuriev
26dab6dee0 mdbx: import - ITS#8722 fix FIRST_DUP/LAST_DUP cursor bounds check.
Change-Id: I6dbba19b594a4bd3545d430a3438cf3b1c5a0a0b
2017-09-07 09:43:43 +03:00
Leo Yuriev
ee9d0903c8 mdbx: use <winternl.h> for Windows. 2017-09-05 21:02:03 +03:00
Leo Yuriev
e6e92134a6 mdbx: fix PVS-Studio warnings. 2017-09-05 21:02:03 +03:00
Leo Yuriev
ace062f4a7 mdbx: fix warning around mode_t.
More for https://github.com/leo-yuriev/libmdbx/issues/15

Change-Id: I1743e01e9111400942fd2a4846a21c475101a148
2017-08-16 11:28:38 +03:00
Leo Yuriev
728252058d mdbx: fix/refine comment.
Change-Id: I8f09ca755ebcc1e58531504a8998391e7a3c8c9a
2017-08-16 09:29:30 +03:00
Leo Yuriev
9b5e28e8e6 mdbx: fix mdbx_setup_dxb() for a case when db-size not (pre)configured by user.
Fix https://github.com/leo-yuriev/libmdbx/issues/11

Change-Id: I6fccd4877fed563cfb3a03f887bbba73eff5ac84
2017-08-16 08:46:20 +03:00
Leo Yuriev
0dc145aa2d mdbx: fix typo and endif comment.
Change-Id: Iae7ae3ce55698c1d6f03111b7d1945f3ac4e9394
2017-08-08 23:42:45 +03:00
Leo Yuriev
7b8a1c9794 mdbx: fix typo.
Change-Id: Ib491469a2a7ebb6bdadf995fa3a964d23fdf7036
2017-07-28 21:53:15 +03:00
Leonid Yuriev
c91885de67 mdbx: use _ASSERTE() for MSVC.
Change-Id: Ibb277e8c98fbfb1e658c85dc49e57769f2683da3
2017-07-28 14:39:44 +03:00
Leonid Yuriev
82a716847b mdbx: fix/workaround mmap-resize for Windows.
Change-Id: I58b5784f1309cd1e88af860828f561fe29f51ff0
2017-07-28 14:37:50 +03:00
Leonid Yuriev
128cc2d308 mdbx: fix pnl_sort().
Change-Id: I57f9a8dd8d61c6f11f8f30d15f8812cf2f850789
2017-07-28 14:37:06 +03:00
Leo Yuriev
0f37ae56d8 mdbx: minor cleanup version-info.
Change-Id: I1c208af0264ed6254d942b29b9e0fc25a745f4e0
2017-07-27 18:10:07 +03:00
Leo Yuriev
c6fc062cfd mdbx: fix MSVC warnings.
Change-Id: Ida49e653510358d7c81fe5da73a0131dcb6268f6
2017-07-27 17:35:00 +03:00
Leo Yuriev
684847db39 mdbx: relax backlog estimation/preparation for freelist_save().
Change-Id: I931b76179855c16cb8b6265db262309061ac196d
2017-07-27 16:58:45 +03:00
Leo Yuriev
aa5403ad38 mdbx: 1/1 as default grow/shrink for MDBX_DEBUG.
Change-Id: I90fa2705113f134984f9ec341ef37131e598d121
2017-07-27 16:58:34 +03:00