4299 Commits

Author SHA1 Message Date
Leo Yuriev
f97cc739cb lmdb: ITS#8117 - reworks of comparison for MDB_INTEGERKEY and MDB_INTEGERDUP.
Change-Id: Icd24589c7a139c4395de1e7c40f16d2c7ea54cf7
2015-05-01 06:50:04 +03:00
Howard Chu
d4bddde7aa lmdb: ITS#8109 fix mdb_cursor_del0 on empty DB.
Change-Id: Idba0acfd64b597f2bc5cb847ca99fe4560eed875
2015-04-24 22:39:21 +03:00
Leo Yuriev
1cab8ed564 lmdb: minor update lmdb/CHANGES.
Change-Id: Ic8070cce524fa899e87f4e3fe8d44c69e6830d58
2015-04-23 08:11:18 +03:00
Leo Yuriev
ae9fdb3a26 lmdb: minor refine 'make test'.
Change-Id: I8c1671b4680d889e04bec3e0b5cd556520854df6
2015-04-23 08:11:18 +03:00
Hallvard Furuseth
8103d0b458 lmdb: Clear error from previous txn on renew.
Change-Id: I45e608d4d1ad3ffa3ad20e8a6b579708f25c3966
2015-04-19 23:44:07 +03:00
Hallvard Furuseth
9752e58a14 lmdb: Fix EACCES description.
Change-Id: Idf5ead68fbac40dd9f944d6ccd86b24f9b4d4a8a
2015-04-19 23:36:21 +03:00
Leo Yuriev
38789b6c0a lmdb: refine sync/async writes of meta-pages.
Change-Id: If309023214e60f349762d337f98ee6fd515faa31
2015-04-18 17:18:50 +03:00
Howard Chu
347c1d6dfb lmdb: ITS#8106 retry writes on EINTR.
Change-Id: Ib422f62f6e1fc81cd773ca600524a53f8f16629e
2015-04-18 16:44:17 +03:00
Howard Chu
d0b4943352 lmdb: ITS#8062 - fix rebalance, also handle subcursors.
(Probably fixes the ITS, definitely fixes a bug) when collapsing
the root page, fixups of other cursors was incomplete.
2015-04-16 13:38:42 +03:00
Hallvard Furuseth
024c5bfb60 lmdb: Cleanup mtest* and sample-*.
Fix mdb_txn_begin(&read-only txn) calls. Test mdb_env_set_maxreaders().
Rename DBI open/close functions. Move mdb_dbi_close() out of txn.

Change-Id: I05c58bfd5d90b7b291718036a3c49ef6ba017ac8
2015-04-14 22:20:29 +03:00
Hallvard Furuseth
2ce1fcbb8f lmdb: Reformat mdb_dbi_open() doc for clarity.
Change-Id: I12a9f9b88a565261d6e5dfdfb7089a4bf50210da
2015-04-14 22:13:42 +03:00
Hallvard Furuseth
5ac6404059 lmdb: Cleanup MDB_env.me_txn0.
More fallout from 4d02c741b120786df1b87ee9ed49c1d3f9bc7522.

Change-Id: I3bbd913c7da3e45f00f1d40c0aac6e7bf5f48c69
2015-04-09 13:25:02 +03:00
Hallvard Furuseth
dba429d608 lmdb: Fix per-txn MDB_NOMETASYNC, MDB_NOSYNC.
Fallout from 4d02c741b120786df1b87ee9ed49c1d3f9bc7522. The flags
were ignored: mdb_txn_renew0/begin cleared and/or did not set them.

Change-Id: Ic7dab1e9a4cf3754e05a3c3df6a10e0efa48af5c
2015-04-09 13:23:59 +03:00
Hallvard Furuseth
c4097ec898 lmdb: Renumber MDB_TXN_* flags, simplify flag code.
Change-Id: I91b0836a84ce80049dbe0829dfc3101fae94c7c9
2015-04-09 13:22:49 +03:00
Hallvard Furuseth
5daf811dcb lmdb: Clear error from previous txn in mdb_txn_renew().
Change-Id: I72b55bfd91c87e4608fbf50f3c70951952855f8f
2015-04-09 13:22:16 +03:00
Leo Yuriev
4a1574c998 all: refine #defines that controls memory checking.
LDAP_DISABLE_MEMORY_CHECK removed, LDAP_MEMORY_DEBUG is used instead.
LDAP_MEMORY_DEBUG_ASSERT replaced with LDAP_MEMORY_ASSERT.

Change-Id: I0f43b9ae10b76c1af39f2c52b34b4ab804521e78
2015-03-26 01:04:14 +03:00
Leo Yuriev
9a76b0a008 liblmdb: fix warnings in lmdb-tools.
Change-Id: I1a1de4bcb9ce9b27f9278f74535e6e83de25bad0
2015-03-24 17:12:08 +03:00
Leo Yuriev
88b465a6ed lmdb-tools: fir LTO-build - use CFLAGS and AR instead of directly. 2015-03-18 09:43:15 +03:00
Howard Chu
1981e8b6ee lmdb: ITS#8066 fix mdb_load with large values.
Change-Id: I8e5320efbea2c457da5a6e7115f4a6c9c38f45c3
2015-03-02 17:46:37 +03:00
Leo Yuriev
602fdd16b9 lmdb: define MDB_INLINE macro instead of __inline.
Change-Id: I3a2f47138a80b09f8c3682a9a26dbf5aca3445f7
2015-02-24 15:14:01 +03:00
Quanah Gibson-Mount
3766484c9e all: 2015 copyright timestamp (from OpenLDAP).
Change-Id: I76f457e30a0478bfc0246c760a2302d380d6f181
2015-02-18 16:04:11 +03:00
Leo Yuriev
ddbda992c7 lmdb: refines Valgrind usage.
Change-Id: I5f30a609b9053bbf8a693b7ca64dc57dc176f6e9
2015-01-18 06:57:49 +03:00
Leo Yuriev
b6b2609f9e lmdb: minor refine (rename md_pad => md_psize).
Change-Id: I60f95d171abebce5967c9bb398c21dbb01ca3d36
2015-01-18 06:57:49 +03:00
Leo Yuriev
48e85e891e lmdb: use pwritev() on non-windows systems (MDB_USE_PWRITEV).
Change-Id: Iebd69846fc87cd6bb584002b366837ecb631b603
2015-01-18 06:57:49 +03:00
Leo Yuriev
1ca2b54966 lmdb: more coherent-barriers where reader's pid updated.
Change-Id: I6262021c074a99e2f548c1fda94fd53c584d2b89
2015-01-17 17:20:33 +03:00
Hallvard Furuseth
ae747bb4ce lmdb: ITS#7971 Fix reader allocation and me_numreaders.
Change-Id: I75c8325de342c2a28592fb0c7a718f95855e7e4d
2015-01-17 16:58:32 +03:00
Hallvard Furuseth
62181cfe87 lmdb: Reject CHANGELESS flags in mdb_env_set_flags().
Reverts part of a2ac10107e2fb845c4a38a339239063ec4407d84.
MDB_ROBUST needed to be accepted, but that flag is gone.

Change-Id: I2aba1e9e02da716d4509e465767bf8be05895c29
2015-01-16 01:26:50 +03:00
Leo Yuriev
1f58fb66ae lmdb: ITS#7969 properly compiler/memory/coherent barriers.
Change-Id: I875d0908a2c828626df544fed48b3144e95e3982
2015-01-16 01:26:50 +03:00
Howard Chu
e7a0c74c09 lmdb: Fix potential null deref (coverity).
Change-Id: Icc5cadfddecbea81c835d84e4ada785e34638514
2015-01-16 01:26:50 +03:00
Hallvard Furuseth
eb885ab910 lmdb: Make SysV semaphores robust. Cleanup MDB_ROBUST.
Backport from master: 66e3f5139105822196aea6a6e63596d25734222a.

Change-Id: Idda165be19ee95c2a0839a180a2ece395502ce26
2015-01-16 01:26:49 +03:00
Leo Yuriev
3015e8d03e lmdb: account pages from penging txn in mdb_txn_straggler().
Backport from master: f756a26a43ad933a98909a974ae84f7d43c30266.

Change-Id: I0f8af7af722977ddeff88d2e8129bcde23ffd06f
2015-01-16 01:26:49 +03:00
Hallvard Furuseth
8375bb0c8d lmdb: ITS#8021 doc - Don't mix MDB_WRITEMAP + non-WRITEMAP.
Change-Id: I99916dbac14cece91154977f2eaecd1604198806
2015-01-16 01:26:49 +03:00
Howard Chu
13b144dc5d ITS#8021 env_sync is invalid in RDONLY env
Change-Id: I2c9c8bcf4b28ea002cb5e4caa117396a82289924
2015-01-16 00:25:18 +03:00
Leo Yuriev
3fd4f9cce0 lmdb: rework workaround for potential ext3/ext4 corruption issue.
Reworked from branch 'mdb.master' origin OpenLDAP:
  8b6c425 2015-01-12 More cleanup for fdatasync hack
  ea89e3d 2015-01-11 Tweak conditionals for fdatasync hack
  462dc09 2015-01-08 fdatasync hack, again
  e86072a 2015-01-08 Revert "Note MDB_SAFE_FDATASYNC"
  293d6bb 2015-01-08 Note MDB_SAFE_FDATASYNC
  9585c01 2015-01-08 Simpler fdatasync hack
  0ef1e0b 2015-01-08 Revert "Fix prev commit for env_sync0"

Imported early while forking ReOpenLDAP:
  985bbbb 2014-12-21 Fix prev commit for env_sync0
  0018eeb 2014-12-18 Hack for potential ext3/ext4 corruption issue

Change-Id: I187fd320620b9ced2e3773cac96f281ff65f97d4
2015-01-16 00:24:31 +03:00
Leo Yuriev
f00d2cdef6 lmdb: MDB_LIFORECLAIM & MDB_COALESCE modes.
Reclaim FreeDB in LIFO order - this is a main feature.
Also aim to coalesce small FreeDFB records.

Change-Id: I76aa062ef59359616e5b697233ec47cbd14f43cd
2015-01-15 23:19:52 +03:00
Leo Yuriev
9eedc88441 lmdb: ITS#7974 oom-handler feature.
Change-Id: I2c56e003fa1e4abe934288581e4c52c80db27c08
2015-01-15 23:19:52 +03:00
Leo Yuriev
84ce8b4cd8 lmdb: properly sync meta-pages in mdb_sync_env().
Meta-pages may be updated during data-syncing in mdb_sync_env(),
in this case database would be inconsistent.

Check-and-retry if lead txn-id changed during flushing data in mdb_sync_env().

Change-Id: I806e6d3766d028dcd4e6b0591aabc718107056fb
2015-01-15 23:19:52 +03:00
Leo Yuriev
fcfe2b7042 lmdb: auto-sync with kbytes threshold (aka checkpoint by kbytes).
Change-Id: If29a3d70e775a65d832f578f0c3edd3ea41dcc67
2015-01-15 23:19:52 +03:00
Leo Yuriev
c9489da920 lmdb: lock meta-pages in writemap-mode to avoid unordered write.
Without locking the meta-pages may be writen by OS before data pages,
in this case database would be inconsistent.

Change-Id: I6a262709b0741d7b57cb68231c4ae1c62a10a743
2015-01-15 23:19:51 +03:00
Leo Yuriev
2df38ad58b lmdb: ITS#7974 get a lag of the reading for dreamcatcher.
Change-Id: I7fc93ce4fa851904521a58a225f04c65eca2d998
2015-01-15 23:19:51 +03:00
Leo Yuriev
7984f8817f lmdb: more usefull info from mdb_stat tool.
Change-Id: I64015952431aebabf792b912acd022a6ddc79903
2015-01-15 23:19:51 +03:00
Leo Yuriev
1b8398b413 lmdb: Use last page (off-by-one error).
Change-Id: Ie1fd90d1562ab8ea8e53701188e3a17495a697e1
2015-01-15 23:19:51 +03:00
Leo Yuriev
1b5de44e23 fix: uninitialized (warnings).
Change-Id: I0f5eab80546a602a616209c6b585605826a06371
2015-01-15 23:19:51 +03:00
Leo Yuriev
c1d30eeeda Cleanup trailing whitespaces.
Change-Id: If80cebd46dab67020a065eed27c5f91ffd6c2dbd
2015-01-15 22:06:04 +03:00
Leo Yuriev
37a8a96733 Merge branch 'mdb-master' at 2015-01-01. 2015-01-07 18:46:52 +03:00
Leo Yuriev
7a7639e5f1 Merge branch 'mdb-0.9' at 2015-01-01. 2015-01-07 18:35:19 +03:00
Leo Yuriev
83055127c1 OpenLDAP mdb.master at 985bbbbdd5d64e57f55249ffdeb7c08035b240b2 (2015-01-01). 2015-01-07 18:12:57 +03:00
Leo Yuriev
8431fb6372 OpenLDAP mdb.RE/0.9 at fe8b13f2251d49689b05876b86b3e10bb89993cd (2015-01-01). 2015-01-07 17:55:19 +03:00
Leo Yuriev
27a2bfaa10 OpenLDAP 2.4.40 2015-01-07 16:49:50 +03:00