Leo Yuriev
4f06a38a50
mdbx: use saturated pgno_add() to avoid overflows.
...
Change-Id: I70000a86a69c9b3399d0a2c345d57ca1908f2881
2017-07-26 12:41:52 +03:00
Leo Yuriev
ad48fd54fb
mdbx: minor refine freelist_save().
...
Change-Id: Ifed9b8d363d45d24c44c1b0a803dad34aada96d3
2017-07-26 12:09:57 +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
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
455de97d36
mdbx: rework using of mdbx_mmap_t and mdbx_msync().
2017-07-12 03:31:20 +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
186d2ee065
mdbx: add 'mti_reader_finished_flag' for speedup find_oldesd().
...
Change-Id: I4a2c8b80efad0cfc12918969125d258043cbffba
2017-06-30 00:43:11 +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
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
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
6f53dd0719
mdbx: add mdbx_dbi_flags_ex().
2017-06-09 16:44:34 +03:00
Leo Yuriev
465459dc58
mdbx: add MDBX_txn.mt_owner and MDBX_THREAD_MISMATCH.
2017-06-06 17:11:29 +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
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
95ebdb7065
mdbx: MAX_PAGESIZE always 64K.
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
Leonid Yuriev
e7ee0bc762
mdbx: refine testing-jitter, add MDBX_DBG_JITTER.
...
Change-Id: Ibc3bd8a16626e97aabc2cc544a3803f2e2bc3a10
2017-06-06 04:15:08 +03:00
Leo Yuriev
d5b0e68326
mdbx: fix merge/rebase error (remove mm_txnid field).
2017-05-29 20:44:17 +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
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
f945e8a062
mdbx: fix cache-aligned size for MDBX_reader.
...
Change-Id: I1e48dd279106daa629fbcd427ec841828799c8f6
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
76f459c08e
mdbx: two-phase txnid to avoid bottom-top DMA updates.
2017-05-28 17:06:04 +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
9959fe8711
mdbx: reorder fields in metapages.
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
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
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
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
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