Commit Graph

530 Commits

Author SHA1 Message Date
Leo Yuriev
ab8fa36033 mdbx: refine mdbx_meta_ot() and dependents.
Change-Id: I449d501f0c3710fdb906e01931e10300ab3b7c9d
2017-07-26 12:26:02 +03:00
Leo Yuriev
0b07749fba mdbx: major fix - madvise(MADV_REMOVE) only for exclusive mode.
Change-Id: I6799df7b85eaf32a1c46f251ca64a4df4ff092b2
2017-07-26 12:09:57 +03:00
Leo Yuriev
a3ee20e4f6 mdbx: more NUM_METAS inside mdbx_chk and mdbx_stat.
Change-Id: I93f4fddcff6b038c5a5143e52c7db233e77ec30b
2017-07-26 12:09:57 +03:00
Leo Yuriev
9e473ab6f2 mdbx: remove obsolete mlock().
Change-Id: I23df282d545eac9dd7bf9df1bd71dedbccc45cfd
2017-07-26 12:09:57 +03:00
Leo Yuriev
4fa4129add mdbx: cleanup freelist_save().
Change-Id: I552e6d7edac61e66b8954f6b58485d6b07194ab5
2017-07-26 12:09:57 +03:00
Leo Yuriev
1babb0a4f7 mdbx: don't put loose pages into befree in lifo mode.
Change-Id: Ibb409e3447e42f1b9f38ed0a33ecb7715fa54d31
2017-07-26 12:09:57 +03:00
Leo Yuriev
ad48fd54fb mdbx: minor refine freelist_save().
Change-Id: Ifed9b8d363d45d24c44c1b0a803dad34aada96d3
2017-07-26 12:09:57 +03:00
Leo Yuriev
3ba5bebec4 mdbx: refine mdbx_txl_alloc().
Change-Id: I624a92c8a845ab563f13619b3638227d012a780b
2017-07-26 12:09:57 +03:00
Leo Yuriev
d5a8bcebbf mdbx: preserve current meta-extra fields/flags.
Change-Id: Id458a85178839bd196435891633c4dd1f3a51d45
2017-07-23 21:33:17 +03:00
Leo Yuriev
58f7674fa5 mdbx: fix mdbx_set_attr().
Change-Id: I6628a0629a17f99f39098b8ccb76259cd65dd353
2017-07-23 21:07:08 +03:00
Leo Yuriev
b4e0344de7 mdbx: check for oldest-aware corruption by writer in txn_renew().
Change-Id: I1a49e4264feb93dc84963db426b11f467f31fcf6
2017-07-23 21:07:08 +03:00
Leo Yuriev
ddc5b9f34f mdbx: start find_oldest() from steady-point.
Change-Id: Icc102f98f86e557e1ccba9cd74255c3da9225d41
2017-07-23 18:39:31 +03:00
Leo Yuriev
425254aba5 mdbx-tools: hush MSVC's internal warnings.
Change-Id: I2b2bdb149149aa8bafff0bb7df205547f645fe10
2017-07-21 22:45:51 +03:00
Leo Yuriev
f96bb5ef4a mdbx-tools: fix coverity issue (minor).
Change-Id: I8031a59336134a355ea31d6f41b241dbc176f577
2017-07-21 22:39:15 +03:00
Leo Yuriev
c5d1384c64 mdbx-tools: more fix MSVC warnings.
Change-Id: Ib5f78a89fea09dc78d4922519eab6eaed4b1a7e6
2017-07-21 16:54:46 +03:00
Leo Yuriev
63af619080 mdbx: #ifdef-guard for FILE_PROVIDER_EXTERNAL_INFO_V1.
Change-Id: I4bc4eb012f7d6ea874a10abd4a2bfcfb789c4a22
2017-07-21 15:49:05 +03:00
Leo Yuriev
242baf761f mdbx: fix/rework shrinking, add MDBX_SHRINK_ALLOWED.
Change-Id: I014440850aa4be927843aa2a6a268794a4da9b2a
2017-07-21 13:55:21 +03:00
Leo Yuriev
599711a007 mdbx: fix/avoid meta-update from setup_dxb() in read-only mode.
Change-Id: I60359f92aba31bb5a22e9a39ea4658d2393e957d
2017-07-21 13:54:06 +03:00
Leonid Yuriev
c8a5df650b mdbx: fix/rework exclusive-locking for Windows.
Change-Id: I1b129a10ed7523024481480647317f1643f2ea70
2017-07-19 14:13:31 +03:00
Leo Yuriev
17e8429a29 mdbx: rework mmap-functions for osal.
- add 'length' and 'current' fields to mmap-object;
 - drop mdbx_mremap();
 - do remap on-demand inside mdbx_mresize();
 - add mdbx_mapresize() which re-creates Valgrind's region.
 - call resize on txn-begin.

Change-Id: I82780f92c4947804e3f14fb7cb71ee655382f9bb
2017-07-19 14:13:31 +03:00
Leo Yuriev
53c2b0abe4 mdbx: checking and reject network/remote files.
Change-Id: I77e8b8bc94785d705461d162cbc40ad58ead67ca
2017-07-12 03:31:20 +03:00
Leo Yuriev
4d1df6ea11 mdbx: rework rollback on dxb-setup to avoid troubles under Windows. 2017-07-12 03:31:20 +03:00
Leo Yuriev
455de97d36 mdbx: rework using of mdbx_mmap_t and mdbx_msync(). 2017-07-12 03:31:20 +03:00
Leo Yuriev
70d54f6f2c mdbx-msvc: refine IntDir/OutDir for msbuild projects. 2017-07-12 02:21:50 +03:00
Leo Yuriev
0167694457 mdbx: building mdbx-tools for Windows.
Change-Id: I9019c4382b7108ec7c442d2b0d4be044a3cb136a
2017-07-12 02:20:47 +03:00
Leo Yuriev
6f00854034 mdbx: take LTO_ENABLED in account for AddressSanitizer default options.
Change-Id: I691eae23ca2cb60c6e2a9260ab41e3c80c8aaeb8
2017-07-07 00:45:52 +03:00
Leo Yuriev
0047ce4bd6 mdbx: add default AddressSanitizer options.
Change-Id: I99b7aee5010f1d43008b2a61efe3fb9bb023ab31
2017-07-07 00:02:56 +03:00
Leo Yuriev
84b4883f00 mdbx: fix returning MDBX-errors after the merge.
Change-Id: Id49b7f341749709cdee476c88c1066e76b6937c1
2017-07-05 19:38:39 +03:00
Leo Yuriev
d01a97f729 tools: fix minor defects (coverity).
Change-Id: I3a80dcb31c54718d22cdca6272aa028685956243
2017-07-04 13:21:16 +03:00
Leo Yuriev
14484a6f32 mdbx: fix minor defects (coverity).
Change-Id: I1a5b0788a87ab2a138b342140648642fd5855ae3
2017-07-04 13:21:16 +03:00
Leo Yuriev
beda690227 mdbx: fix resource-leak in mdbx_env_open_ex() in case of error (coverity).
Change-Id: I9e808e2de4a64d05205a79c9d90feacc87ec930d
2017-07-04 13:21:16 +03:00
Leo Yuriev
93d92db43d mdbx: fix mischecking in mdbx_reader_check0() (coverity).
Change-Id: I2e3aaba1426c3b152a39b90f6d171380948da0a7
2017-07-04 13:21:16 +03:00
Leo Yuriev
bf8507f3ec mdbx: fix mdbx_env_info() to avoid null-deref in lck-free mode (coverity).
Change-Id: Ica8fe6c7f5a18af3a4d7d38ce8a1a092d5f1b2f7
2017-07-04 11:45:48 +03:00
Leo Yuriev
aec35300c4 mdbx: fix new API function after the merge.
Change-Id: Ic929444ceb137ccaa2ab4fe82b4f93a3cb5a92aa
2017-07-04 10:46:46 +03:00
Leo Yuriev
b34e92d308 mdbx: cleanup/reformat after the merge.
Change-Id: I3e0fe8f1292a6387e8d3ff8b904170f05d8e1770
2017-07-04 10:35:32 +03:00
Leo Yuriev
594834bc9c mdbx: Merge branch 'nexenta' into devel.
Change-Id: I7a00f98e088f21ebc91a3861309b697f01e1fa66
2017-07-04 09:22:09 +03:00
Leo Yuriev
3c5ae4cc9c mdbx: disable C4548 as workaround for buggy WinSDK 10.0.10240.0 2017-07-03 12:50:48 +03:00
Leo Yuriev
78ae12aa10 mdbx: fix MSVC 'padding' warnings, minor refine fields ordering. 2017-07-03 11:41:24 +03:00
Leo Yuriev
1d702aa94f mdbx: more warning control for MSVC. 2017-07-03 06:45:41 +03:00
Leonid Yuriev
3e6a672286 mdbx: fix MSVC warnings, add uint16-range-asserts.
Change-Id: Ie67a728035eeae250efbf962270b5c17c974db23
2017-07-03 04:41:00 +03:00
Leo Yuriev
2ed74ee78f mdbx: fix MSVC size_t/uint64_t warnings (minor).
Change-Id: I580eea87e9c557c61b1ff0b66feaafce139d2c45
2017-06-30 07:25:56 +03:00
Leo Yuriev
186d2ee065 mdbx: add 'mti_reader_finished_flag' for speedup find_oldesd().
Change-Id: I4a2c8b80efad0cfc12918969125d258043cbffba
2017-06-30 00:43:11 +03:00
Leo Yuriev
acfa096aba mdbx: more for lockless/readonly mode (testing needed).
Change-Id: I28f46f5a373212ebb5df780f4d2b5e216d8cdae2
2017-06-30 00:43:11 +03:00
Leo Yuriev
5fbb8d1018 mdbx: fix C11 warnings abount atomic. 2017-06-24 19:33:34 +03:00
Leonid Yuriev
ca83480c34 mdbx: pragma lib ntdll.lib 2017-06-21 01:42:41 +03:00
Leo Yuriev
9a2fff91f3 mdbx: dynamic mapsize/geometry and API (mostly done).
Change-Id: Ifb768ff3207cae1755c53c211a3ae552c6455e12
2017-06-21 01:42:41 +03:00
Leo Yuriev
45defdc170 mdbx: refine err returning (MDBX_EPERM, etc).
Change-Id: Iaa21a0e6632be47d6ef2a3676ba5e1381fc03b4d
2017-06-21 01:42:27 +03:00
Leo Yuriev
10b0197026 mdbx: drop mdbx_get_errno_checked().
Change-Id: Ifa829b465083f17eba911e19947bdae854f9759c
2017-06-21 01:41:25 +03:00
Leo Yuriev
151d4540de mdbx: refine internal constant (use UINT32_C, etc minors).
Change-Id: I0f994ee75b5aa1494fcc8ca42a46120865676e25
2017-06-21 01:39:53 +03:00
Leo Yuriev
f93818a926 mdbx: fix MAX_MAPSIZE for Win32.
Change-Id: I04cbffb14ab7c73d935614b2f5c8140000b78d76
2017-06-21 01:36:49 +03:00
Leo Yuriev
edc936dc28 mdbx: rework mdbx_oomkick() and speedup mdbx_find_oldest().
Change-Id: Icc2c450e7f10efe1b4ab8705e6a659cece256dc1
2017-06-16 05:27:01 +03:00
Leo Yuriev
81661ff952 mdbx: add shared cache for oldest reader's txnid.
Change-Id: I48cbc778b873445dffa8ecef1fc3633e0193131f
2017-06-16 05:21:49 +03:00
Leo Yuriev
c01aeb5c68 mdbx: refine meta_txnid().
Change-Id: I4d78b2ebed8850c90dc762405ba939be7385c9a3
2017-06-16 05:21:49 +03:00
Leo Yuriev
ae71c2aa36 mdbx: simplify find-oldest inside mdbx_page_alloc().
Change-Id: I88dfc8ee268eba2452bffd3c4e6cfd066bcd8b04
2017-06-16 05:21:27 +03:00
Leo Yuriev
760f7d1331 mdbx: fix nasty 'inverted if-condition' inside mdbx_reader_check0().
Fix c2087f186e
2017-06-15 15:05:14 +03:00
Leo Yuriev
ddc3787936 mdbx: fix MDBX_RESULT_TRUE handling inside mdbx_mutex_failed()...mdbx_oomkick(). 2017-06-15 14:56:25 +03:00
Leo Yuriev
71e2fe3df0 mdbx: add MDBX_DBG_DUMP for mdbx_setup_debug().
So, meta-pages and lck-section now will be included into a coredump.
2017-06-15 13:45:16 +03:00
Leo Yuriev
0ef41bef2b mdbx: fix mdbx_txn_straggler() for write-txn. 2017-06-13 19:27:52 +03:00
Leo Yuriev
6f53dd0719 mdbx: add mdbx_dbi_flags_ex(). 2017-06-09 16:44:34 +03:00
Leo Yuriev
3ca64535b6 mdbx: add NTAPI to OSAL. 2017-06-07 18:17:21 +03:00
Leo Yuriev
d2d513014d mdbx: add mdbx_lck_upgrade() to OSAL. 2017-06-06 20:28:00 +03:00
Leo Yuriev
204904df7c mdbx: disallow begin txn if env not yet opened. 2017-06-06 20:28:00 +03:00
Leo Yuriev
fbce45cb98 mdbx: allow calling mdbx_env_sync() inside transaction. 2017-06-06 20:28:00 +03:00
Leo Yuriev
1d15ae4b13 mdbx: zeroing MDBX_page.mp_validator for Valgrind/AddressSanitizer. 2017-06-06 17:47:46 +03:00
Leo Yuriev
465459dc58 mdbx: add MDBX_txn.mt_owner and MDBX_THREAD_MISMATCH. 2017-06-06 17:11:29 +03:00
Leo Yuriev
3bf3a08f96 mdbx: fix write-txn thread cleanup. 2017-06-06 17:09:49 +03:00
Leonid Yuriev
318646794e mdbx: partial fix MSVC level-4 warnings. 2017-06-06 04:15:08 +03:00
Leonid Yuriev
bfa6dea784 mdbx: fix size_t/unsigned/int warnings.
Change-Id: Ic5a8684aed232b8b732d6e7a87a6757f3f7afcec
2017-06-06 04:15:08 +03:00
Leonid Yuriev
7e85ad82f1 mdbx: refine read_header(), add MDBX_TOO_LARGE.
Change-Id: I25b9bb2e3817993d627b2b784dfa496d9ba7e7b0
2017-06-06 04:15:08 +03:00
Leo Yuriev
61d7ea283f mdbx: size_t for sync_threshold and mapsize. 2017-06-06 04:15:08 +03:00
Leo Yuriev
802c10f13f mdbx: log2shift instead of multiplication by pagesize.
Change-Id: I72c4c7699a409795459b466ff74c388b15b13687
2017-06-06 04:15:08 +03:00
Leo Yuriev
9ef81ac16c mdbx: add 'unlikely' to IS_OVERFLOW().
Change-Id: Ia92aac948046890ca4f9d9c3fbff0b4ac5728fab
2017-06-06 04:15:08 +03:00
Leo Yuriev
439ae3983c mdbx: use 2^N constants for fill-threshold.
Change-Id: I3e190f5af77282a7995ae733c7a6865a21daa6c3
2017-06-06 04:15:08 +03:00
Leo Yuriev
59c22ab036 mdbx: use 32-bit pgno_t (page numbers).
Change-Id: Ie9f3528e12b7be27765c0225edde26e4d8282692
2017-06-06 04:15:08 +03:00
Leo Yuriev
1343b46466 mdbx: add txnid-list functions. 2017-06-06 04:15:08 +03:00
Leo Yuriev
52f52de2d5 mdbx: include meta-pages into a coredump. 2017-06-06 04:15:08 +03:00
Leo Yuriev
95ebdb7065 mdbx: MAX_PAGESIZE always 64K. 2017-06-06 04:15:08 +03:00
Leo Yuriev
19dd181b6f mdbx: fix STATIC_ASSERT for MSVC. 2017-06-06 04:15:08 +03:00
Leo Yuriev
61a3766e23 mdbx: update DB format and signatures.
Change-Id: I9c4b187e8ebc3df63fef15ae98872e27d56a01ab
2017-06-06 04:15:08 +03:00
Lorenz Bauer
d99b2a4b16 mdbx: use F_SETNOSIGPIPE to SIGPIPE husing on a OS X. 2017-06-06 04:15:08 +03:00
Leo Yuriev
98a8fbdc7a mdbx: restore SIGPIPE hushing in the db-copy-thread. 2017-06-06 04:15:08 +03:00
Leonid Yuriev
e7ee0bc762 mdbx: refine testing-jitter, add MDBX_DBG_JITTER.
Change-Id: Ibc3bd8a16626e97aabc2cc544a3803f2e2bc3a10
2017-06-06 04:15:08 +03:00
Leo Yuriev
009618560f mdbx: refine mdbx_is_dirty(). 2017-05-30 15:32:05 +03:00
Leo Yuriev
d5b0e68326 mdbx: fix merge/rebase error (remove mm_txnid field). 2017-05-29 20:44:17 +03:00
Leo Yuriev
a36b065cd9 mdbx: logging MDBX_PROBLEM reasons. 2017-05-29 20:17:02 +03:00
Leo Yuriev
11e8727483 mdbx: fix missing braces. 2017-05-29 20:16:09 +03:00
Leo Yuriev
70fe982c3a mdbx: fix MDBX_WANNA_RECOVERY description. 2017-05-29 19:38:43 +03:00
Leo Yuriev
d91785f635 mdbx: disable unnecessary assertion in mdbx_is_dirty(). 2017-05-29 19:38:43 +03:00
Leo Yuriev
0f676db491 mdbx: add locking while open/close/drop dbi-handles (avoid dbi-related races).
This avoid races and collisions between threads when opening,
closing and deleting DBI-handles.

unfortunately, this does not resolve collision in the case an one thread
closing the DBI-handle while the another thread performs transaction.

Change-Id: I48c3ffb11a8f83739fae1712db3476645f573e09
2017-05-29 19:38:43 +03:00
Leo Yuriev
bd5d092a2b mdbx: check system pagesize (paranoia).
Change-Id: I596c686a996f7d1521789f22900022c4da629e1b
2017-05-28 18:55:18 +03:00
Leo Yuriev
a0ddf167dd mdbx: common database format for 32/64 targets (remove 'size_t' structures).
Change-Id: I2d7c77603ee27c5ae4b82f762a726f71136527c8
2017-05-28 18:35:58 +03:00
Leo Yuriev
fca74ab80c mdbx: refine meta-commit in WRITEMAP mode.
Change-Id: Ieb53bf6144a104fc88b0b07b4abdde20f4b01978
2017-05-28 18:35:58 +03:00
Leo Yuriev
2347282b4f mdbx: add assertions for reclaiming-edge.
Change-Id: I87e11f69423b4e7841c4f8ec6b5ecfdff9e96b0d
2017-05-28 17:06:04 +03:00
Leo Yuriev
236ddda1ae mdbx: more assertions for mdbx_txn_renew0().
Change-Id: I3c179d105c3e6388c08b2c371ada4d457af50bed
2017-05-28 17:06:04 +03:00
Leo Yuriev
2ea97ae281 mdbx: refine find_oldest() and meta_head(). 2017-05-28 17:06:04 +03:00
Leo Yuriev
91bc3129d5 mdbx: refine mdbx_page_search().
Change-Id: I9c87ae2ffe317538813ebec971ad093936f4c504
2017-05-28 17:06:04 +03:00
Leo Yuriev
f945e8a062 mdbx: fix cache-aligned size for MDBX_reader.
Change-Id: I1e48dd279106daa629fbcd427ec841828799c8f6
2017-05-28 17:06:04 +03:00
Leo Yuriev
bb5e1b43af mdbx: relax mdbx_is_dirrty() assertion for map-range. 2017-05-28 17:06:04 +03:00
Leo Yuriev
17c8057684 mdbx: fix gcc 'uninitialized' warning with -Og. 2017-05-28 17:06:04 +03:00
Leo Yuriev
77f0e5e38e mdbx: drop unused debug features. 2017-05-28 17:06:04 +03:00
Leo Yuriev
60fed8bbca mdbx: fix first-rdonly-blocker bug. 2017-05-28 17:06:04 +03:00
Leo Yuriev
5c3691eff1 mdbx: split atomics for 32/64 uints. 2017-05-28 17:06:04 +03:00
Leo Yuriev
76f459c08e mdbx: two-phase txnid to avoid bottom-top DMA updates. 2017-05-28 17:06:04 +03:00
Leo Yuriev
dd33bea1d8 tools: mdbx_chk - don't 'rolled-back' in cooperative more. 2017-05-28 17:02:19 +03:00
Leo Yuriev
bd70135db1 mdbx: re-read and check meta-pages in mdbx_read_header() for consistency. 2017-05-28 17:02:19 +03:00
Leo Yuriev
93c5a84bcd mdbx: more checks mdbx_read_header() for metapage's content. 2017-05-28 17:02:19 +03:00
Leo Yuriev
1c170cb866 mdbx: add MAX_PAGENO, MIN_PAGENO, MAX_MAPSIZE, MIN_MAPSIZE. 2017-05-28 17:02:19 +03:00
Leo Yuriev
18cf804d0b mdbx: add STATIC_ASSERT_MSG, refine STATIC_ASSERT. 2017-05-28 17:02:19 +03:00
Leo Yuriev
4293840055 mdbx: fix meta-invalidate race in MDBX_WRITEMAP mode (when target == head). 2017-05-28 17:02:19 +03:00
Leo Yuriev
f4d3b76f81 mdbx: minor refine and rename mdbx_sync_locked().
Change-Id: Iab650b091006e5646d9d22316d19aa58a517684b
2017-05-28 17:02:19 +03:00
Leo Yuriev
9959fe8711 mdbx: reorder fields in metapages. 2017-05-28 17:02:19 +03:00
Leo Yuriev
c02a3ac687 mdbx: ignore meta-pages with wrong pagesize. 2017-05-28 17:02:19 +03:00
Leo Yuriev
0e49b1b2b4 mdbx: update 'mapsize' while opening with txn-increment. 2017-05-28 17:02:19 +03:00
Leo Yuriev
d642127d10 tools: fix 'tail' show in mdbx_chk. 2017-05-28 17:02:19 +03:00
Leo Yuriev
5d836d2b03 mdbx: clarify steady/fluid/weak names of a head. 2017-05-28 17:02:19 +03:00
Leo Yuriev
1e0654a4a8 tool: show operational txnid in mdbx_chk. 2017-05-28 17:02:19 +03:00
Leo Yuriev
47cc45dec4 mdbx: don't check present durability mode for MDBX_RDONLY. 2017-05-28 17:02:19 +03:00
Leo Yuriev
700f3e9c2a mdbx: more checks for meta-params. 2017-05-28 17:02:19 +03:00
Leo Yuriev
9eeb00f448 mdbx: trinity of meta-pages. 2017-05-28 17:02:19 +03:00
Leo Yuriev
141306644d mdbx: fix mdbx_env_copy_asis(). 2017-05-26 03:10:31 +03:00
Leo Yuriev
7315b99b9d mdbx: fix MSVC/Windows warnings. 2017-05-25 19:12:51 +03:00
Leo Yuriev
b9dbe7c577 mdbx: fix segfault and double-free (in case twice abortion of the same write-txn). 2017-05-25 18:39:45 +03:00
Leo Yuriev
96de36baef mdbx: refine mdbx_cursor_count() API. 2017-05-25 16:21:29 +03:00
Leo Yuriev
3a166e1970 test: temporary crutch. 2017-05-25 15:30:35 +03:00
Leo Yuriev
b94e761d73 mdbx: fix 'magic' bug. 2017-05-25 15:08:45 +03:00
Leo Yuriev
5519d568f0 mdbx: fix mdbx_filesize() for Windows. 2017-05-25 09:40:29 +03:00
Leo Yuriev
15e2a45425 mdbx: check size of lck-file. 2017-05-25 09:40:29 +03:00
Leo Yuriev
c335b16c81 mdbx: rework mapsize's stuff inside mdbx_setup_dxb(). 2017-05-25 09:40:29 +03:00
Leo Yuriev
af7b468e63 mdbx: use uint64_t or size_t insted of off_t (buggy on Windows). 2017-05-24 18:50:24 +03:00
Leo Yuriev
7ef7e70012 mdbx: add STATIC_ASSERT. 2017-05-24 18:45:08 +03:00
Leo Yuriev
96b9af0b4d mdbx: minor refine idl functions. 2017-05-24 17:06:18 +03:00
Leo Yuriev
924e81ed92 mdbx: refine includes, drop midl.h and mdbx_osal.h 2017-05-24 17:05:59 +03:00
Leo Yuriev
dd7855c30d mdbx: cleanup tabs (minor). 2017-05-24 13:37:06 +03:00
Leo Yuriev
06de7a5155 mdbx: rename the rest MDBX_xyz. 2017-05-24 02:24:38 +03:00
Leo Yuriev
62ebc59330 mdbx: rework version info (stub for now). 2017-05-24 02:17:10 +03:00
Leo Yuriev
88ea2768f5 mdbx: fix gcc 'comparison is always true' warning. 2017-05-23 22:35:59 +03:00
Leo Yuriev
2c43997026 mdbx: change mdbx_env_set_oomfunc() API. 2017-05-23 22:18:21 +03:00
Leo Yuriev
132c9c994e mdbx: add mdbx_fastmutex_t. 2017-05-23 22:18:21 +03:00
Leo Yuriev
8c18622592 mdbx: rework MDBX_val. 2017-05-23 22:18:21 +03:00
Leo Yuriev
ac8e987346 mdbx: rework MDBX_txn. 2017-05-23 22:18:21 +03:00
Leo Yuriev
34213c554a mdbx: rework MDBX_reader. 2017-05-23 22:18:21 +03:00
Leo Yuriev
a3ed42b999 mdbx: rework MDBX_page, drop COPY_PGNO. 2017-05-23 22:18:20 +03:00
Leo Yuriev
8f2c21e2ba mdbx: rework MDBX_node. 2017-05-23 22:18:20 +03:00
Leo Yuriev
8828e90ff9 mdbx: mdbx_condmutex_t instead of mutex/condvar pair. 2017-05-23 19:57:26 +03:00
Leo Yuriev
2f97939efd mdbx: more cleanup mdbx_midl_sort(). 2017-05-23 19:57:26 +03:00
Leo Yuriev
eff0f92fa7 mdbx-tools: replace size_t/PRIuPTR with uint64_t/PRIu64. 2017-05-23 19:57:26 +03:00
Leo Yuriev
0cd30792bb mdbx: split MDB_ID into pgno_t and txnid_t. 2017-05-23 19:57:26 +03:00
Leo Yuriev
5c2042c466 tools: internal minor renames (preparation for changes). 2017-05-23 17:45:58 +03:00
Leo Yuriev
8b9e391dd0 mdbx: cleanup internals (mostly formatting, but not only). 2017-05-23 17:45:58 +03:00
Leo Yuriev
398b839b98 mdbx: drops old/obsolete API (mdbx_env_copy and mdbx_env_copydf). 2017-05-23 17:45:58 +03:00
Leo Yuriev
0eee938c5f mdbx: add MDBX_EIO. 2017-05-23 17:45:58 +03:00
Leo Yuriev
994481e4f4 mdbx: replace size_t with uint64_t/uint32_t in API. 2017-05-23 17:45:58 +03:00
Leo Yuriev
d0793a1daf mdbx: fix MDB_DUPSORT with MDB_CURRENT update bug. 2017-05-22 15:35:33 +03:00
Leo Yuriev
82d3595b76 mdbx: add MDBX_EKEYMISMATCH. 2017-05-22 15:35:33 +03:00
Leo Yuriev
d9eeac45b2 mdbx: fix extra-logging without NDEBUG, but with MDBX_DEBUG=0. 2017-05-19 07:39:50 +03:00
Leo Yuriev
0810f4e105 mdbx: fix MDBX_CORRUPED error (nasty copy&paste bug). 2017-05-18 22:31:19 +03:00
Leo Yuriev
b4fd0500d1 mdbx: more lck-debug. 2017-05-18 16:17:24 +03:00
Leo Yuriev
d2af39fd73 mdbx: more for without-lck mode (not completed). 2017-05-18 16:17:24 +03:00
Leo Yuriev
fd8be99282 mdbx: cleanup mdbx_env_init_metas(). 2017-05-18 16:17:24 +03:00
Leo Yuriev
818e742c58 mdbx: cleanup mdbx_env_create(). 2017-05-18 16:17:24 +03:00
Leo Yuriev
6ee3aebc32 mdbx: use flock() for share/exclusive lck. 2017-05-18 16:17:24 +03:00
Leo Yuriev
4481555c90 mdbx: refine mdbx_dkey() API. 2017-05-18 16:02:29 +03:00
Leo Yuriev
c479c5ff15 mdbx: rework mdbx_env_sync().
Change-Id: I6192e8a333b607d1e46eadddb73863943635f1ec
2017-05-18 16:02:29 +03:00
Leo Yuriev
7a4541f598 mdbx: minor cleanup. 2017-05-18 15:57:06 +03:00
Leo Yuriev
00be62e235 mdbx: cleanup formating. 2017-05-18 15:57:06 +03:00
Leo Yuriev
677625ead1 mdbx: add MDBX_WANNA_RECOVERY. 2017-05-18 04:31:54 +03:00
Leo Yuriev
015a242c89 mdbx: rollback weak checkpoint or MDB_CORRUPTED. 2017-05-18 04:30:10 +03:00
Leo Yuriev
ed46246931 mdbx: rework mdbx_dbi_open(). 2017-05-16 00:50:12 +03:00
Leo Yuriev
00081298d6 mdbx: add mdbx_get_errno_checked(). 2017-05-15 12:08:04 +03:00
Leo Yuriev
533e01cc93 mdbx: change mdbx_dbi_close() API. 2017-05-11 10:08:22 +03:00
Leo Yuriev
e8a430999c mdbx: hush MSVC warnings for atomic stubs. 2017-05-11 10:08:22 +03:00
Leo Yuriev
29f01cf3f4 mdbx: use PRIuPTR/PRIiPTR/PRIxPTR instead of %z. 2017-05-10 19:16:23 +03:00
Leo Yuriev
8848df34bc mdbx: check gcc/clang version for stdatomic.h 2017-04-27 18:46:11 +03:00
Leo Yuriev
4e9b734b52 mdbx: fix mdbx_read_header(). 2017-04-27 18:15:12 +03:00
Leo Yuriev
82f053a685 mdbx: more debug for lck-seize. 2017-04-27 18:15:12 +03:00
Leo Yuriev
678e4f5738 mdbx: more check/debug around mdbx_pread() and mdbx_read_header(). 2017-04-27 18:15:12 +03:00
Leo Yuriev
f8903ca7c7 mdbx: minor refine/speedup mdbx_cursor_put(). 2017-04-27 18:07:58 +03:00
Leo Yuriev
4b2cb66453 mdbx: use mdbx_jitter4testing() for race detection. 2017-04-27 15:52:52 +03:00
Leo Yuriev
7204c46421 mdbx: add mdbx_osal_jitter() and mdbx_jitter4testing(). 2017-04-27 15:52:52 +03:00
Leo Yuriev
40dee6f05f mdbx: rework mdbx_read_header(). 2017-04-27 15:52:52 +03:00
Leo Yuriev
fd078ee163 mdbx: check for txnid overflow (paranoia).
Change-Id: Id7cd62abf8605150ff5491fb1129383e3e748603
2017-04-27 01:37:42 +03:00
Leo Yuriev
9e07b71c27 mdbx: fix snap-state bug.
Change-Id: I8700209ab012bfef21c88fe06c39b80a640291c6
2017-04-27 01:37:42 +03:00
Leo Yuriev
939285bef2 mdbx: add atomics-ops for assertions. 2017-04-27 01:37:42 +03:00
Leo Yuriev
7ec571c9a0 mdbx: partial cleanup/reformat comments.
Change-Id: Ia96a5b307dc065b4d1920234c3cce93a0e585876
2017-04-27 01:36:31 +03:00
Leo Yuriev
333e5fada3 mdbx: internal cleanup (rename, etc). 2017-04-26 19:11:34 +03:00
Leo Yuriev
99002d016f mdbx: add yielding for lck-testing for Windows if NDEBUG undefined. 2017-04-26 14:17:52 +03:00
Leo Yuriev
5ed0ccfcbb mdbx: rework mdbx_pread(). 2017-04-25 19:59:00 +03:00
Leo Yuriev
aa59522dbe mdbx: minor refine open-path. 2017-04-25 19:51:23 +03:00
Leo Yuriev
326dea8bc1 mdbx: use FormatMessage() for Windows. 2017-04-25 19:17:57 +03:00
Leo Yuriev
993730d2f1 mdbx: more cleanup for Windows. 2017-04-24 21:14:36 +03:00
Leo Yuriev
e98a1e5319 mdbx: move MDBX_LOCK_SUFFIX to API defs. 2017-04-24 17:52:56 +03:00
Leo Yuriev
0d59cd4fe2 mdbx: rework lck/body setup. 2017-04-24 16:15:01 +03:00
Leo Yuriev
19d877635c mdbx: alter db-file extensions. 2017-04-24 16:15:01 +03:00
Leo Yuriev
2e54210e79 mdbx: add mdbx_osal.h with platform-like err codes. 2017-04-24 16:15:01 +03:00
Leo Yuriev
f7507110ef mdbx: alter mdbx_txn_id() API. 2017-04-24 16:15:01 +03:00
Leo Yuriev
ce9c4acea6 mdbx: fix mdbg_canary_put().
Change-Id: I36917a686b28405ed7ecd07dbeb1b4d517720410
2017-04-23 19:16:22 +03:00
Leo Yuriev
1bddc9dcbc mdbx: change mdbx_canary_get() API.
Change-Id: Ie8831d8acb7113916b8a44b870596a9bf1ccc8b2
2017-04-23 19:16:22 +03:00
Leo Yuriev
11ac6a02ff mdbx: rework posix-lck.
Change-Id: Icdd61731424b0d591fd28da0468b9623d079c94a
2017-04-23 19:16:22 +03:00
Leo Yuriev
6b4f92b22e mdbx: rework windows-clk.
Change-Id: Ie0f8422a39879c9d5e6b4697c7e90fe67076b021
2017-04-23 19:16:22 +03:00
Leo Yuriev
1596bceff2 mdbx: rework mdbx_env_setup_locks()'s tasks.
Change-Id: I79953554a0b2cce8235ec5dbc83f183cb3fd56a0
2017-04-23 19:16:22 +03:00
Leo Yuriev
cd37b81cc5 mdbx: refine mdbx_txn_renew0(). 2017-04-23 19:16:22 +03:00
Leo Yuriev
8bed6a5c89 mdbx: fix mdbx_rthc_remove(). 2017-04-23 19:16:22 +03:00
Leo Yuriev
55226499a8 mdbx: rework reader_check0() and mutex recovery. 2017-04-23 19:16:22 +03:00
Leo Yuriev
41c51fdac2 mdbx: refine debug macros/levels (initial). 2017-04-23 19:16:22 +03:00
Leo Yuriev
c1ad75d810 mdbx: check env-flags while opening live db. 2017-04-23 19:16:22 +03:00
Leo Yuriev
36f1491ba8 mdbx: cleanup mdbx_mutex_failed(). 2017-04-23 19:16:22 +03:00
Leo Yuriev
ebb404e5bc mdbx: remove tsan_mutex. 2017-04-23 19:16:22 +03:00
Leo Yuriev
585496339a mdbx: kill/remove mm_txnid. 2017-04-23 19:16:22 +03:00
Leo Yuriev
99dd373215 mdbx: fix/refine mdbx_txn_end() and mdbx_txn_renew0(). 2017-04-23 19:16:21 +03:00
Leo Yuriev
c2087f186e mdbx: fix/rework mdbx_reader_check(). 2017-04-23 19:16:21 +03:00
Leo Yuriev
1b490fda24 mdbx: add mdbx_dbi_sequence(). 2017-04-17 21:38:33 +03:00
Leo Yuriev
dfc3020426 mdbx: fix mdbx_canary_put(). 2017-04-17 21:38:25 +03:00
Leonid Yuriev
a4a542c3b5 mdbx: fix nasty typo in Windows's mdbx_pwritev(). 2017-04-15 22:45:56 +03:00
Leo Yuriev
a3644aa6d0 mdbx: new testset (initial, stub).
Initial stub for https://github.com/ReOpen/libmdbx/issues/8
2017-04-10 23:20:22 +03:00
Leo Yuriev
095cd25e23 mdbx: check sys-pagesize for power-of-2. 2017-04-05 18:33:19 +03:00
Leo Yuriev
b558757cf1 mdbx: roundup readers/lck-filesize. 2017-04-05 18:21:24 +03:00
Leo Yuriev
0b400c5dd0 mdbx: fix posix mdbx_mmap(). 2017-04-05 18:21:05 +03:00
Leo Yuriev
fcb63130d6 mdbx: fix posix mdbx_lck_destroy(). 2017-04-05 18:20:25 +03:00
Leo Yuriev
6d507233cc mdbx: snprintf/vsnprintf stub for MSC. 2017-04-04 15:35:52 +03:00
Leo Yuriev
ab4597cedc mdbx: add MDBX_MAXDATASIZE. 2017-03-31 17:59:45 +03:00
Leo Yuriev
a2593625cc mdbx: add mdbx_get_maxkeysize(). 2017-03-31 17:59:45 +03:00
Leo Yuriev
5c5ef256b3 mdbx: change mdbx_dkey(). 2017-03-31 17:04:45 +03:00
Leo Yuriev
f8eb858ef3 mdbx: drop MDB_MAXKEYSIZE. 2017-03-31 17:04:36 +03:00
Leo Yuriev
cb6ac8912f mdbx: now MDBX_MODE_ENABLED always. 2017-03-31 12:46:09 +03:00
Leo Yuriev
7d351f74c4 mdbx: rename mdbx_stat() to mdbx_dbi_stat(). 2017-03-29 18:52:55 +03:00
Leo Yuriev
9731e07120 mdbx: uint32/uint64 for INTEGER_KEY. 2017-03-29 00:53:39 +03:00
Leo Yuriev
69a6d10a8a mdbx: crutch for Windows's UnlockFile(). 2017-03-29 00:53:39 +03:00
Howard Chu
c25934a8dd mdbx: backport - fix xcursor after cursor_del (ITS#8622).
Re-fix 6b1df0e4c7fadd21d1233d7157229b2d89ccaa04 from ITS#8406

Change-Id: I177bef20cfa4b464a38cb42d66b7134f84434490
2017-03-29 00:53:39 +03:00
Leo Yuriev
0f49ed6e53 mdbx: big-bang (initial).
- OS Abstraction Layer;
 - Windows Support.
 - preparation for more changes.

Change-Id: I53772eda9091ba361cbc9a28656190ea0d4c5cee
2017-03-29 00:53:39 +03:00
Leo Yuriev
95e606606a mdbx: subdirs.
Change-Id: Iea70b29ed39f55ee363729300f6ce54127b4e880
2017-03-16 18:04:56 +03:00