Commit Graph

776 Commits

Author SHA1 Message Date
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
2392c70e2b mdbx: refine MDBX_oom_func description. 2017-06-15 05:09:36 +03:00
Leo Yuriev
0ef41bef2b mdbx: fix mdbx_txn_straggler() for write-txn. 2017-06-13 19:27:52 +03:00
Leo Yuriev
e7f9f2bd5c ci: add Coverity Scan (initial).
Change-Id: I7430ae49b1e5f02dbaa2fc31a5d3b992ec2ca2e3
2017-06-12 15:41:53 +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
90b30e7584 mdbx: level-4 warnings for debug-build. 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
7f4684abff mdbx: update TODO. 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
9318e4cabb test: fix oom_callback() nasty bug. 2017-05-28 17:06:04 +03:00