Commit Graph

368 Commits

Author SHA1 Message Date
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
Leo Yuriev
595f9e700d lmdb: fix b-tree walking bug in case empty db.
Change-Id: I28c0985493327babe4d2ae5c6cd56116a26e6034
2015-08-05 22:59:18 +03:00
Leo Yuriev
a243a38aa6 lmdb: adding page-space usage info to mdb_chk.
Change-Id: I12dcdb54894a362d41612e973f983cb4e067520c
2015-08-05 22:59:18 +03:00
Leo Yuriev
c32cf0fea4 lmdb, back-mdb: use 'long' as result to speedup comparison.
Change-Id: I3ade0c7525f4a461a7edf5873af196e6b33c0727
2015-08-05 14:35:09 +03:00
Leo Yuriev
e2127a6e57 lmdb: check multi-value ordering in mdb_chk.
Change-Id: Ie4e1b0f795fa84c96a4f505cece14607a95e7c9e
2015-08-05 00:45:57 +03:00
Leo Yuriev
b60f510355 lmdb: rework key/data comparison to avoid alignment errors.
Change-Id: I291b50ad6f7dd18f6cbdef34028d917e10166cf1
2015-08-05 00:45:57 +03:00
Leo Yuriev
41d38a1e4d lmdb: fix format-string for 'entries' in mdb_chk.
Change-Id: I5a8c04e79416f22b64505be536b666620a9cce41
2015-08-04 22:34:16 +03:00
Leo Yuriev
1dbcf773a0 lmdb: ITS#8192 (reference to EINTR on WIN32) - not affected in ReOpenLDAP.
Change-Id: I5b2f76b24bc93841ee3c89f9adb9a81ba4581c5d
2015-08-04 14:10:44 +03:00
Howard Chu
b980ff72cb lmdb: 0.9.16, updated CHANGES for ITS#8181, #8190, #8200.
Change-Id: I87a1a3136ea6dcdd322ab24ec1df9391aa4280b8
2015-08-04 13:57:14 +03:00
Hallvard Furuseth
c9a8595ef2 lmdb: Kill magic numbers for NUM_METAS, databases.
Change-Id: I7ed12f081aed7eb65087fea511053157fb8f9c1e
2015-08-04 13:57:14 +03:00
Hallvard Furuseth
061fe51e8c lmdb: ITS#7377 Catch mdb_put() to blocked/read-only txns.
...early enough that txn state is left unchanged.

Change-Id: Ia475660f339f7b741eaaa126978f8419a19b67a0
2015-08-04 13:57:14 +03:00
Hallvard Furuseth
d6b3c6f710 lmdb: ITS#7377 Always notice env error on txn startup.
Move the check to the end of txn startup.  Catches env
breakage which happens while the new txn waits for a lock.

Change-Id: I074d411cd5339b5e6caa2691078ea07b0d49828e
2015-08-04 13:57:14 +03:00
Hallvard Furuseth
11999c8c02 lmdb: Cleanup, Drop !mt_dbxs hack, use MDB_TXN_FINISHED.
Change-Id: I23beaaf931c938ee9f3886ca1928ecbcd2fbe5ba
2015-08-04 13:57:14 +03:00
Hallvard Furuseth
342d56977f lmdb: Catch most uses of finished/parent txns.
* Add MDB_TXN_FINISHED, MDB_TXN_HAS_CHILD, MDB_TXN_BLOCKED.
* Clear mt_numdbs in writers, for TXN_DBI_EXIST() to catch.
  We already do in readers.

Change-Id: I4f714c0789188dfab4ce22b7d9d3a75d8b62ef6b
2015-08-04 13:57:14 +03:00
Hallvard Furuseth
e3c8fa8eba lmdb: Move code into mdb_txn_end(). Was mdb_txn_reset0.
Side effects:
* Clean txn up a bit even before freeing it.
* Tweak DEBUG output at txn end. Add DEBUG after commit(writer).

Change-Id: Ia9905257893923bb14cdf33b60b6387af3121f81
2015-08-04 13:57:14 +03:00
Hallvard Furuseth
23af429b3f lmdb: ITS#8200 Fix mdb_midl_shrink() usage, return void.
Change-Id: I506a170d434178d43f01b3e9597c4a03b3b3e7a7
2015-08-04 13:57:14 +03:00
Hallvard Furuseth
862cfc30c4 lmdb: Simpler mdb_node_add().
Change-Id: I5b1f851a098aeb4b5adcd7ed55150a055cd63102
2015-08-04 13:57:14 +03:00
Leo Yuriev
2fdf96cf4f lmdb: ITS#8181 reflect changes for mdb_chk.
Change-Id: I9c7a1323af5d62b549bc2430c8cb8bf5c5686bee
2015-08-04 13:57:14 +03:00
Hallvard Furuseth
be27186f76 lmdb: ITS#8181 Verify that records are/aren't DBs.
Except we don't catch the user passing F_SUBDATA to
mdb_cursor_<put/del>, like an internal LMDB call.

Change-Id: I5ebce36694045279702c74490a5a634217d4f95d
2015-08-04 13:57:13 +03:00
Howard Chu
91a6b6de57 lmdb: ITS#8190 fix cursor EOF bug.
Change-Id: I97556bc521e1d4d4ea9f3e43c14a8a2fe62b8231
2015-08-04 13:57:13 +03:00
Hallvard Furuseth
96fb8eec8a lmdb: More ESECT declarations.
Change-Id: Iaed5c6e35b1bd6e59caf8d1f52b265ec4852c84a
2015-08-04 13:57:13 +03:00
Hallvard Furuseth
57b263693c lmdb: Add DB_USRVALID, to avoid 'dbi == FREE_DBI' tests.
Change-Id: Ic44ce41fd2fff1abb4cd24821ece07ef30254565
2015-08-04 13:57:13 +03:00
Hallvard Furuseth
4cb5d637d4 lmdb: Simpler flag/DBI checks and MDB_DEBUG.
Change-Id: I37a00fcc23f2060538ab4378f204ae0efcdb59ea
2015-08-04 13:57:13 +03:00
Hallvard Furuseth
9e52d29fd8 lmdb: Simpler mdb_drop().
MDB_DBI_CHANGED(,MAIN_DBI) is never true.

Change-Id: I0d12b9965d8251908ec41d1febc6b5c354a93a01
2015-08-04 13:57:13 +03:00
Hallvard Furuseth
6524dbf3a1 lmdb: Simpler mdb_node_shrink().
Change-Id: If0e4153e69c4f858ee45471c4888ec2024253b50
2015-08-04 13:57:13 +03:00
Hallvard Furuseth
a6fa632a54 lmdb: Simpler mdb_txn_commit().
mt_env is always set.
Commit(mt_child) resets mt_child, so parent need not.

Change-Id: Ib8af816a964a4b70fa6fa622b3d9dd463e9460b3
2015-08-04 13:57:13 +03:00
Hallvard Furuseth
82213d732c lmdb: cleanup mdb_txn_begin().
Change-Id: Ia28e255a0497d02f7d87ca301d5be8a60886d4e1
2015-08-04 13:57:13 +03:00
Hallvard Furuseth
b3a3dc4c6b lmdb: Omit scanning DUPSORT sub-DB leaves in mdb_drop0().
Change-Id: Icc670a81210a9160e6cb90b9442994c008f599bd
2015-08-04 13:57:13 +03:00
Hallvard Furuseth
b13d850bd7 lmdb: Use mdb_cmp_int_a/mdb_cmp_long() for FREE_DBI.
Change-Id: Id66356b27e9d257fbf5bc8ce1111845be8683d62
2015-08-04 13:57:13 +03:00
Hallvard Furuseth
84b6ecb9a8 lmdb: Hide internal flags in mdb_env_get_flags().
Change-Id: I9ff2888a61a53fb0c7471de980ec7b97c59c6096
2015-08-04 13:57:13 +03:00
Leo Yuriev
295beda00c lmdb: fix ABI compatibility with original liblmdb.so
Change-Id: I770a49b7a506f3f2a21ea3af36fd07c16a32dc30
2015-06-04 19:12:14 +03:00
Hallvard Furuseth
001f89d4af lmdb: Clarify mdb_env_open() doc of 'mode' param.
Change-Id: Ia156bdd14f80c25b0d0cf44f9ab8a0fd270a4bb7
2015-06-03 02:12:58 +03:00
Hallvard Furuseth
75f9080c7d lmdb: more CHANGES.
Change-Id: I212a4d3124614de8d4a537f5e56d3749ce832081
2015-06-01 15:38:18 +03:00
Hallvard Furuseth
f71cb6d69e lmdb: ITS#8156 Fix MDB_MAXKEYSIZE doc.
Change-Id: Ia9dae2e68f28dcb715ac34226b358212317199c2
2015-06-01 15:38:18 +03:00
Hallvard Furuseth
55ae3dfa8b lmdb: ITS#8157 mdb_txn_renew0(): init after error checks.
Change-Id: I9ea344b98cb8c99a25ba7087abefbfe62b3417a0
2015-05-28 16:00:27 +03:00
Hallvard Furuseth
bb7b923fdd lmdb: Set/clear mp_pad, md_pad (MDB_DUPFIXED data size).
mdb_xcursor_init1(): md_pad is only used when MDB_DUPFIXED.
mdb_page_split():    Copy mp_pad too. Used by mdb_page_list().

Change-Id: Ia35cba3a367c04929a34a5879abc968202086e89
2015-05-21 21:40:39 +03:00
Hallvard Furuseth
36be104097 lmdb-test: mtest*.c: Fix MDB_NOOVERWRITE, plug cursor leak.
Change-Id: Idc2840fafc0d8cb4aaaa2e23b899a9ce7fb2b52b
2015-05-21 21:40:39 +03:00