154 Commits

Author SHA1 Message Date
Leo Yuriev
dc3256e91c mdbx: adds signatures to detect ABI mixup. 2015-10-20 23:59:06 +03:00
Leo Yuriev
68171d5f5d lmdb: provide both interfaces - advanced 'mdbx' and original 'lmdb'. 2015-10-13 23:50:25 +03:00
Leo Yuriev
09c140c1f4 lmdb: detach from ReOpenLDAP project. 2015-10-12 20:01:16 +03:00
Howard Chu
73cfae2522 lmdb: ITS#8264 fix cursor_del cursor tracking.
Some destination fixups need to happen immediately after nodes
are moved, before rebalancing

Change-Id: Ia4258cae368ff0ef96b7835cc421f2db40f7f741
2015-10-11 22:21:37 +03:00
Leo Yuriev
8473370d65 lmdb: CHANGES - ITS#7377, #8237, #8221, #8256, #8258.
Change-Id: Id825ceaf0fbb9575c0dbfd9f69997013d6f1fad0
2015-10-11 22:21:05 +03:00
Howard Chu
f2d0824bdb lmdb: ITS#8258 fix rebalance/split.
The tree height can also increase during rebalance, not just shrink.
This can happen if update_key needs to split a parent branch page.

Change-Id: Ie232bd9f4a6225b912b912a68f0b35411a632317
2015-10-06 10:13:27 +03:00
Hallvard Furuseth
305ba98967 lmdb: Fix typo in mdb_tassert().
No effect on current code.

Change-Id: Ia935ba784c33e3704ea1cfa1d59a1f28d2c527f8
2015-10-06 10:11:18 +03:00
Howard Chu
3f27fb7822 lmdb: ITS#8259 fix usage ordering.
Change-Id: I8c6f844e211b403a5652760da0e0a4836cbdf95b
2015-10-06 10:06:57 +03:00
Howard Chu
ef72fbaea6 lmdb: ITS#8221 don't merge branch pages needlessly.
Change-Id: I6b535f70392e081027d8803b6623b0c51f21ec8b
2015-10-06 10:05:46 +03:00
Luke Yeager
8e7fbfa063 lmdb: ITS#8256 Create install directories if needed.
Change-Id: Ie44f8529989fd77da0415d0c898b4af3451a851a
2015-10-06 09:59:51 +03:00
Leo Yuriev
8e2a9a9a78 lmdb: deferred cleanup of reader's threads.
This should fix https://github.com/ReOpen/ReOpenLDAP/issues/48

Change-Id: I67feb3a9852f183dcbe83626321896ba43a591b7
2015-09-07 02:38:10 +03:00
Howard Chu
83ba70e3be lmdb: ITS#8237 fix ITS#7589 regression.
Change-Id: Idd3c95f6e515f0f70c7fd33257c80354a3953f2f
2015-09-06 22:57:01 +03:00
Leo Yuriev
1b78961cf6 lmdb: fix clang warnings.
Change-Id: I6586b44c21872e7a1e128d0053837b73ed4448ec
2015-09-06 11:30:16 +03:00
Leo Yuriev
4554b8f62c all: fix build by clang (defines, warnings).
Conflicts:
	contrib/slapd-modules/usn/usn.c

Change-Id: I68572808e30a35fdd14aa0a459cfbb8da4be6dc5
2015-09-05 18:35:32 +03:00
Leo Yuriev
fa0751771e lmdb: properly link with librt.so compatibility.
Add '--no-as-needed' to LDFLAGS before -lrt.

Otherwise ld may drop dependency to librt.so,
and DSO could't be loaded when glibc < 2.17.

Change-Id: I06f34958d7efc8c56dd80ce2a55a2b8425e791cd
2015-09-05 18:30:30 +03:00
Leo Yuriev
abda67f23e lmdb: minor Makefile update, CFLAGS from environment.
Change-Id: I1c36f6bbc064136b404b5de18a88961309883018
2015-09-05 13:18:58 +03:00
Leo Yuriev
16a30be8fc lmdb: minor refine mdb_chk output,
mostly for 'zero size-of-entry' error.

Change-Id: I0f7ae514860ea05179fd929b76f78ba843902e92
2015-09-03 17:26:23 +03:00
Leo Yuriev
07ee471b1c lmdb: me_maxkey_limit always computed and checked against MDB_MAXKEYSIZE at opening env.
Change-Id: Ice0a425900a8c7b37d5b6cfcd1434edc8d400a74
2015-09-02 18:08:43 +03:00
Leo Yuriev
f7d8812e6c lmdb: n-entries info from b-tree traversal in mdb_chk.
Change-Id: Ic9343dcdba976ac51c8f5776d2f7c9fed59da8e0
2015-09-02 17:53:48 +03:00
Leo Yuriev
9106e80fba lmdb: refine output of mdb_chk.
Change-Id: Ic4982e5f4df313f3226e49444951d08fcd6ea2d5
2015-09-02 16:19:13 +03:00
Leo Yuriev
15e0600b6c lmdb: major rework of traversal b-tree for mdb_chk.
Change-Id: I9d382516f76092f44fc1a12d7554039582b87656
2015-09-02 16:19:12 +03:00
Leo Yuriev
8ff2458003 lmdb: refine and flush output in mdb_chk.
Change-Id: Ia3c744918f73de4648c088ec6b56d44860378447
2015-09-01 15:14:00 +03:00
Leo Yuriev
fd4163d784 lmdb: mdb_chk informs about elapsed time.
Change-Id: I8066563b1c427e48179d7163a534bc242037f4cc
2015-09-01 13:43:22 +03:00
Leo Yuriev
de0cf8dfbb lmdb: refine exit-codes in mdb_chk.
Change-Id: I003ff0d887e3e0fb0439d201efcf4a76e8e69aac
2015-09-01 13:31:03 +03:00
Leo Yuriev
e7f58da2ac lmdb: support for a utterly no-sync mode,
by combination of MDB_NOSYNC and MDB_MAPASYNC.

Change-Id: I3e2d6c8f044a7522436dab4d0818d4d59b78b78d
2015-09-01 12:15:59 +03:00
Leo Yuriev
030aca6816 lmdb: fix lmdb_load for properly restoration of dbi-flags.
Change-Id: I634fd36e3259afd0ddac23c4cb21631f96ba1c86
2015-08-31 23:47:37 +03:00
Leo Yuriev
e955d64ebf lmdb: made mdb_load compatible with mdb_dump.
Ignores 'duplicates=' and 'db_pagesize=',
drops 'duplicates=' from mdb_dump and mdb_chk.

Change-Id: I295d19c8382fee1d5779b047aec5220788e5dd9c
2015-08-31 23:28:05 +03:00
Leo Yuriev
55cbf745ff lmdb: follow mdb_dump to ITS#8181.
Update mdb_dump corresponding to I5ebce36694045279702c74490a5a634217d4f95d.

Change-Id: I813bb6b4eedd9aba6f79b9c566331a1c053b53a2
2015-08-31 22:57:23 +03:00
Leo Yuriev
1be4140abf lmdb: mdb_chk allows interruption of b-tree travesersal.
Change-Id: Ia59236dcb575203baebf9e65310cdf1e700c33ce
2015-08-31 21:43:00 +03:00
Leo Yuriev
37b3629329 lmdb: '-s' option for mdb_chk to processing only a specific subdb.
Change-Id: Iad44204a9cadde3620de98194aa31f7420c8a2aa
2015-08-31 21:34:57 +03:00
Leo Yuriev
69beb1525f lmdb: '-d' option to mdb_chk for disabling b-tree traversal.
Change-Id: Ifd3bb0d93a4fa6d93f46b547fd73ee92dc331418
2015-08-31 20:58:41 +03:00
Howard Chu
db7e7ae4df lmdb: origin - return to release engineering.
Change-Id: I26b54d4cc8b68a091ecb3cefe707cf6c5317da3d
2015-08-30 01:12:11 +03:00
Hallvard Furuseth
e4d9f0a905 lmdb: ITS#7377 catch calloc error in mdb_env_init_meta().
Change-Id: I2b1a4ec9f86a3a7844b157863d18ce81be400cef
2015-08-30 01:02:43 +03:00
Howard Chu
73941be79a lmdb: Doc tweak - MDB_RESERVE / DUPSORT incompat.
For those people who insist on ignoring the obvious.

Change-Id: I499f7073c18d887a1171a8ffd92fea7a7602ed9c
2015-08-30 01:01:44 +03:00
Howard Chu
d6b5070100 lmdb: Another MDB_APPEND doc tweak.
Missed this in 7ce29b9edbdaf34b7aeb545324008ed4dff62952

Change-Id: Ida12915843e414bfdd6fb6575425525ccac99605
2015-08-30 01:00:59 +03:00
Leo Yuriev
6a3efb82eb lmdb-test: workaround for MDB_FIXEDMAP to avoid sporadic failures.
Change-Id: I6ba993ff50956d328fd76326c67aa83dff20ce48
2015-08-24 03:37:05 +03:00
Leo Yuriev
537fc0fe1a lmdb: simple write benchmark.
Change-Id: Iadcbe8ad5922b2ecf1ea597b188ef368bc097185
2015-08-24 03:36:55 +03:00
Leo Yuriev
00d2057204 lmdb: fix rare MDB_MAP_FULL when pages are available in the gc.
Rework preparation backlog of available pages for cleanup FreeDB.
https://github.com/ReOpen/ReOpenLDAP/issues/42

Change-Id: I47592b4cabf1950e61bb87e67c08ea03e95496fa
2015-08-20 19:26:20 +03:00
Leo Yuriev
5856a6bb6e lmdb: output subtotal % info for each dbi-table.
Change-Id: I897d9fcdf9df4149045a0867a982716bfe7acbe4
2015-08-20 01:11:52 +03:00
Howard Chu
7fc3427b9c lmdb: Release 0.9.16
Change-Id: I47fb565592dd71e1fb3575584c560883418b7bf5
2015-08-15 13:17:46 +03:00
Leo Yuriev
b8c45546f6 lmdb: more likely/unlikely hints.
Change-Id: I38f1f80243bfc5b1ffe910175516dbb3f06c27ba
2015-08-15 13:17:46 +03:00
Leo Yuriev
ad8c4a19bb lmdb: fix segfault in mdb_chk when mdb_env_open() failed.
Change-Id: If72d35518c2d4dd33d284049e00fc633e65ee52c
2015-08-13 18:30:03 +03:00
Leo Yuriev
65555273aa lmdb: rework mdb_chk for cooperative and shared modes.
Change-Id: I22ff9721c43da00b1a514ec85adc664829140506
2015-08-13 18:30:02 +03:00
Leo Yuriev
c70999052c lmdb: rework error handling inside mdb_chk.
Change-Id: I226f7b4bccb18261425799ea78bf43436867c7d4
2015-08-13 18:30:02 +03:00
Leo Yuriev
96d69e3fa1 lmdb: added mdb_env_open_ex() and exclusive/monopoly mode for mdb_chk.
Change-Id: I867e7f17924ffecb744440e95db96c0a7411d6ef
2015-08-13 18:30:02 +03:00
Leo Yuriev
59b74d5df0 lmdb: added write-lock mode for mdb_chk.
Change-Id: I9e28f2153bdcb190c1e4fa502242aa6d4f78787b
2015-08-06 22:16:41 +03:00
Leo Yuriev
0ee96ec09b lmdb: fix mdb_chk doesn't account an errors, but just report it.
Change-Id: Ib70784ed7dff5ca67092b2fee556ae9f5a7aa3a6
2015-08-06 22:16:34 +03:00
Leo Yuriev
1171e4d73a lmdb: fix build non-debug mode (MDB_DEBUG=0).
Change-Id: I362a6bd03c73dca70bc6df5f72badf59e560389a
2015-08-06 17:13:25 +03:00
Leo Yuriev
255fbfa303 lmdb: added '-v' when calling mdb_chk after tests.
Change-Id: Ic897a3e3d7935ced380f18cd4f2d99219bd77d70
2015-08-05 22:59:18 +03:00
Leo Yuriev
3fc45cbaea lmdb: fix assertion failure in case error while opening DB in debug-mode.
Change-Id: I56a1122369640920d594416e9bd3de0f3f9cd8fd
2015-08-05 22:59:18 +03:00