]> git.sur5r.net Git - openldap/log
openldap
12 years agoMerge branch 'mdb.master' of ssh://git-master.openldap.org/~git/git/openldap
Howard Chu [Sun, 2 Oct 2011 18:14:53 +0000 (11:14 -0700)]
Merge branch 'mdb.master' of ssh://git-master.openldap.org/~git/git/openldap

12 years agoUse MDB_RESERVE for id2entry_put
Howard Chu [Sun, 2 Oct 2011 17:06:06 +0000 (10:06 -0700)]
Use MDB_RESERVE for id2entry_put

12 years agoAdd MDB_RESERVE mode
Howard Chu [Sun, 2 Oct 2011 17:02:30 +0000 (10:02 -0700)]
Add MDB_RESERVE mode

When putting a record, just make space for the data, don't copy it.
(Not compatible with MDB_DUPSORT, since the actual data is needed
to determine the insert location.)

12 years agoTweak cursor adjustment code
Howard Chu [Sat, 1 Oct 2011 05:15:05 +0000 (22:15 -0700)]
Tweak cursor adjustment code

Skip the original cursor that made the change

12 years agoITS#6979 avoid bash-ism
Howard Chu [Fri, 30 Sep 2011 10:34:03 +0000 (03:34 -0700)]
ITS#6979 avoid bash-ism

12 years agoITS#7006 fix MozNSS wildcard cert match
Howard Chu [Fri, 30 Sep 2011 10:27:19 +0000 (03:27 -0700)]
ITS#7006 fix MozNSS wildcard cert match

12 years agoITS#7034 use mutex for connection handshake when using PEM nss
Rich Megginson [Tue, 6 Sep 2011 18:59:26 +0000 (12:59 -0600)]
ITS#7034 use mutex for connection handshake when using PEM nss

PEM nss is not thread safe when establishing the initial connection
using SSL_ForceHandshake.  Create a new mutex - tlsm_pem_mutex - to
protect this function call.
The call to SSL_ConfigServerSessionIDCache() is not thread-safe - move it
to the init section and protect it with the init mutex.

12 years agoITS#7040 don't complain about other server's CSNs
Howard Chu [Fri, 30 Sep 2011 10:04:10 +0000 (03:04 -0700)]
ITS#7040 don't complain about other server's CSNs

Only worry if consumer has newer state for our SID. Fixes breakage
caused by ITS#6606.

12 years agoITS#7037 restart consumer on Persist errors
Howard Chu [Fri, 30 Sep 2011 09:27:04 +0000 (02:27 -0700)]
ITS#7037 restart consumer on Persist errors

Consumer should never get NO_SUCH_OBJECT for an Add to the underlying DB
during Persist phase.

12 years agoITS#7037 fix syncrepl_add_glue for empty suffix
Howard Chu [Fri, 30 Sep 2011 09:10:37 +0000 (02:10 -0700)]
ITS#7037 fix syncrepl_add_glue for empty suffix

12 years agoITS#7051 fix GNUtls cert dn parse
Howard Chu [Fri, 30 Sep 2011 07:41:13 +0000 (00:41 -0700)]
ITS#7051 fix GNUtls cert dn parse

12 years agoITS#7052 syncrepl deletes need a non-empty CSN
Howard Chu [Fri, 30 Sep 2011 07:09:01 +0000 (00:09 -0700)]
ITS#7052 syncrepl deletes need a non-empty CSN

Must not let the underlying DB generate its own.

12 years agoMake sure mdb_open actually got a sub-db record
Howard Chu [Fri, 30 Sep 2011 04:07:07 +0000 (21:07 -0700)]
Make sure mdb_open actually got a sub-db record

12 years agoDoc for the MDB_NOSUBDIR env option
Howard Chu [Fri, 23 Sep 2011 04:46:12 +0000 (21:46 -0700)]
Doc for the MDB_NOSUBDIR env option

12 years agoAdd MDB_NOSUBDIR option
Howard Chu [Fri, 23 Sep 2011 01:05:06 +0000 (18:05 -0700)]
Add MDB_NOSUBDIR option

Create the data file using exactly the given pathname, and
the lock file using a suffix on the data file name.

12 years agoReader table notes
Howard Chu [Thu, 22 Sep 2011 11:34:40 +0000 (04:34 -0700)]
Reader table notes

12 years agoassert cleanup
Howard Chu [Thu, 22 Sep 2011 00:21:48 +0000 (17:21 -0700)]
assert cleanup

12 years agotxn_abort/commit free all their cursors now.
Howard Chu [Wed, 21 Sep 2011 23:37:29 +0000 (16:37 -0700)]
txn_abort/commit free all their cursors now.

12 years agoOnly free malloc'd cursors
Howard Chu [Wed, 21 Sep 2011 23:06:52 +0000 (16:06 -0700)]
Only free malloc'd cursors

12 years agoUpdated for mdb_txn_begin API change.
Howard Chu [Wed, 21 Sep 2011 22:59:08 +0000 (15:59 -0700)]
Updated for mdb_txn_begin API change.

Nested txn stuff which we don't use.

12 years agoMerge remote branch 'origin/mdb.master'
Howard Chu [Wed, 21 Sep 2011 22:58:55 +0000 (15:58 -0700)]
Merge remote branch 'origin/mdb.master'

12 years agoTrack changes to all cursors.
Howard Chu [Wed, 21 Sep 2011 21:14:11 +0000 (14:14 -0700)]
Track changes to all cursors.

For any change to a page or node, update all other cursors pointing
at the same page (or node). Cursors are now stored in a linked list
off their owning transaction. Cursors are all closed when the transaction
ends. Cursors in parent transactions are updated when their child
transaction commits.

12 years agoAdd support for nested transactions.
Howard Chu [Tue, 20 Sep 2011 19:57:05 +0000 (12:57 -0700)]
Add support for nested transactions.

12 years agoback-bdb/back-mdb IDL cleanup.
Hallvard Furuseth [Tue, 13 Sep 2011 07:39:28 +0000 (09:39 +0200)]
back-bdb/back-mdb IDL cleanup.

Parenthesize macros.  Microoptimize IDL search.  Use RANGE_<FIRST/LAST>
when IDL is known to be a range.

12 years agoCleanup ISO C compatibility for recent commits
Hallvard Furuseth [Sun, 18 Sep 2011 19:49:25 +0000 (21:49 +0200)]
Cleanup ISO C compatibility for recent commits

12 years agoMore libmdb vs back-mdb C type tweaks.
Hallvard Furuseth [Sun, 18 Sep 2011 20:37:45 +0000 (22:37 +0200)]
More libmdb vs back-mdb C type tweaks.

Do not access a size_t via an unsigned long pointer, an MDB_val via a
berval pointer, or the inverse. Instead copy into the proper data types.

12 years agoMerge branch 'mdb.master'
Hallvard Furuseth [Mon, 19 Sep 2011 08:30:30 +0000 (10:30 +0200)]
Merge branch 'mdb.master'

12 years agolibmdb IDL cleanup.
Hallvard Furuseth [Tue, 13 Sep 2011 07:39:28 +0000 (09:39 +0200)]
libmdb IDL cleanup.

Microoptimize IDL search.
Use RANGE_<FIRST/LAST> when IDL is known to be a range.

12 years agoAdditional fix for prev commit
Howard Chu [Mon, 19 Sep 2011 01:26:54 +0000 (18:26 -0700)]
Additional fix for prev commit

12 years agoMerge branch 'mdb.master' of ssh://git-master.openldap.org/~git/git/openldap
Howard Chu [Mon, 19 Sep 2011 01:14:05 +0000 (18:14 -0700)]
Merge branch 'mdb.master' of ssh://git-master.openldap.org/~git/git/openldap

12 years agoMake sure 2 subpages fit in one real page
Howard Chu [Mon, 19 Sep 2011 01:13:23 +0000 (18:13 -0700)]
Make sure 2 subpages fit in one real page

12 years agoMerge remote branch 'origin/mdb.master'
Howard Chu [Mon, 19 Sep 2011 00:08:40 +0000 (17:08 -0700)]
Merge remote branch 'origin/mdb.master'

12 years agoFix last delete from a subpage
Howard Chu [Mon, 19 Sep 2011 00:07:47 +0000 (17:07 -0700)]
Fix last delete from a subpage

12 years agoFix 09006ccec7928c9cf53bca6abe741e8d4d466c98
Howard Chu [Sun, 18 Sep 2011 23:39:18 +0000 (16:39 -0700)]
Fix 09006ccec7928c9cf53bca6abe741e8d4d466c98

Check for stale DBs was in the wrong place.

12 years agoFix prev commit
Howard Chu [Sun, 18 Sep 2011 21:47:41 +0000 (14:47 -0700)]
Fix prev commit

Don't truncate all indices if specific indices were given.

12 years agoSupport index truncation
Howard Chu [Sun, 18 Sep 2011 21:28:36 +0000 (14:28 -0700)]
Support index truncation

12 years agoMerge branch 'mdb.master' of ssh://git-master.openldap.org/~git/git/openldap
Howard Chu [Sun, 18 Sep 2011 21:28:20 +0000 (14:28 -0700)]
Merge branch 'mdb.master' of ssh://git-master.openldap.org/~git/git/openldap

12 years agoFix mdb_drop() if not deleting the DB record
Howard Chu [Sun, 18 Sep 2011 21:18:27 +0000 (14:18 -0700)]
Fix mdb_drop() if not deleting the DB record

12 years agoFix typo, minor cleanup
Howard Chu [Sun, 18 Sep 2011 20:28:08 +0000 (13:28 -0700)]
Fix typo, minor cleanup

12 years agoNew mdb_close() signature
Howard Chu [Sun, 18 Sep 2011 20:25:38 +0000 (13:25 -0700)]
New mdb_close() signature

12 years agoMerge remote branch 'origin/mdb.master'
Howard Chu [Sun, 18 Sep 2011 20:25:09 +0000 (13:25 -0700)]
Merge remote branch 'origin/mdb.master'

12 years agoSupport single parameter substitution in filter
Howard Chu [Sun, 18 Sep 2011 20:24:24 +0000 (13:24 -0700)]
Support single parameter substitution in filter

12 years agoAdd mdb_drop() for deleting a DB
Howard Chu [Sun, 18 Sep 2011 19:37:02 +0000 (12:37 -0700)]
Add mdb_drop() for deleting a DB

Allow MIDLs to grow arbitrarily, to allow unlimited number of
pages to be freed in one txn.

12 years agoAPI change, consistency check
Howard Chu [Sun, 18 Sep 2011 17:38:08 +0000 (10:38 -0700)]
API change, consistency check

mdb_close() takes an env, not a txn.
Also, add check for stale DB records (in case some other process
wrote to the DB last).

12 years agoMerge branch 'mdb.master' of ssh://git-master.openldap.org/~git/git/openldap
Howard Chu [Sat, 17 Sep 2011 11:02:52 +0000 (04:02 -0700)]
Merge branch 'mdb.master' of ssh://git-master.openldap.org/~git/git/openldap

12 years agoNew sorted-dup subpage support
Howard Chu [Fri, 16 Sep 2011 23:51:32 +0000 (16:51 -0700)]
New sorted-dup subpage support

Instead of converting directly to a subDB when the first duplicate
item is seen for a key, convert to a subpage instead. Allow the
subpage to grow up to the overflow limit, then convert to a subDB.
This saves a significant amount of space in a typical slapd index
database.

Currently we don't convert back to the smaller form if items are
later deleted. Probably could do that with some hysteresis, e.g.,
convert back from subDB to subpage when the size drops below
(overflow limit/2). Maybe later.

12 years agodeltasync test tweaks
Howard Chu [Sat, 17 Sep 2011 10:08:02 +0000 (03:08 -0700)]
deltasync test tweaks

Check replication success before stopping consumer.
Set retry/interval to make sure consumer reconnects after provider restart.

12 years agoMerge branch 'mdb.master' of ssh://git-master.openldap.org/~git/git/openldap
Howard Chu [Thu, 15 Sep 2011 17:37:13 +0000 (10:37 -0700)]
Merge branch 'mdb.master' of ssh://git-master.openldap.org/~git/git/openldap

12 years agoUse FNV-1A hash to generate unique mutex names
Howard Chu [Thu, 15 Sep 2011 17:36:15 +0000 (10:36 -0700)]
Use FNV-1A hash to generate unique mutex names

For Windows and MacOSX

12 years agoMerge remote branch 'origin/mdb.master'
Howard Chu [Thu, 15 Sep 2011 03:34:27 +0000 (20:34 -0700)]
Merge remote branch 'origin/mdb.master'

12 years agoDoc tweak - txn flags
Howard Chu [Thu, 15 Sep 2011 03:33:09 +0000 (20:33 -0700)]
Doc tweak - txn flags

12 years agoMacOSX semaphore names are limited to 31 chars
Howard Chu [Thu, 15 Sep 2011 03:30:26 +0000 (20:30 -0700)]
MacOSX semaphore names are limited to 31 chars

Including the terminating NUL. Good job documenting that, guys.

12 years agoMerge remote branch 'origin/mdb.master'
Howard Chu [Wed, 14 Sep 2011 18:46:40 +0000 (11:46 -0700)]
Merge remote branch 'origin/mdb.master'

12 years agoAdd MacOSX support
Howard Chu [Wed, 14 Sep 2011 18:31:27 +0000 (11:31 -0700)]
Add MacOSX support

mmap() with FIXEDMAP fails, otherwise things work.

12 years agoFix entry_alloc with no attrs
Howard Chu [Wed, 14 Sep 2011 17:14:02 +0000 (10:14 -0700)]
Fix entry_alloc with no attrs

12 years agoFix onelevel search from last commit
Howard Chu [Wed, 14 Sep 2011 16:54:58 +0000 (09:54 -0700)]
Fix onelevel search from last commit

12 years agoMinor doc cleanup
Howard Chu [Wed, 14 Sep 2011 08:46:08 +0000 (01:46 -0700)]
Minor doc cleanup

12 years agoMore docs
Howard Chu [Wed, 14 Sep 2011 08:08:01 +0000 (01:08 -0700)]
More docs

12 years agoNamespace cleanup
Howard Chu [Wed, 14 Sep 2011 06:36:41 +0000 (23:36 -0700)]
Namespace cleanup

12 years agoMore search optimization
Howard Chu [Tue, 13 Sep 2011 23:58:38 +0000 (16:58 -0700)]
More search optimization

Tighten up entry_alloc/entry_decode
Track parent nodes in idscopes

12 years agoTentative speedup - use plain ints for entry_encode/decode
Howard Chu [Tue, 13 Sep 2011 22:19:04 +0000 (15:19 -0700)]
Tentative speedup - use plain ints for entry_encode/decode

Keep entries word-aligned. Yields ~10% speedup, but also 10% more space used.
May revert this if the space cost is unacceptable.

12 years agoMerge remote branch 'origin/mdb.master'
Howard Chu [Tue, 13 Sep 2011 22:24:33 +0000 (15:24 -0700)]
Merge remote branch 'origin/mdb.master'

12 years agoTweak search_node inner loop to avoid LEAF2 checks
Howard Chu [Tue, 13 Sep 2011 20:34:22 +0000 (13:34 -0700)]
Tweak search_node inner loop to avoid LEAF2 checks

12 years agocursor_set/search_node tweaks, use intcmp when possible
Howard Chu [Tue, 13 Sep 2011 18:25:17 +0000 (11:25 -0700)]
cursor_set/search_node tweaks, use intcmp when possible

12 years agomdb_db_close() should not force env_sync in quick mode
Howard Chu [Tue, 13 Sep 2011 08:28:37 +0000 (01:28 -0700)]
mdb_db_close() should not force env_sync in quick mode

12 years agoResolve MDB/HDB monitor OID clashes
Howard Chu [Mon, 12 Sep 2011 18:41:04 +0000 (11:41 -0700)]
Resolve MDB/HDB monitor OID clashes

12 years agoJust use memcpy since we know it's non-overlapping
Howard Chu [Mon, 12 Sep 2011 18:05:38 +0000 (11:05 -0700)]
Just use memcpy since we know it's non-overlapping

12 years agoTweak back-mdb integer types to match libmdb.
Hallvard Furuseth [Mon, 12 Sep 2011 13:58:43 +0000 (15:58 +0200)]
Tweak back-mdb integer types to match libmdb.

Also do not cast between berval and MDB_val.  That breaks when
sizeof(berval.bv_len) != sizeof(MDB_val.mv_size).

12 years agoMinor tweaks, update relfunc behavior
Howard Chu [Mon, 12 Sep 2011 08:11:56 +0000 (01:11 -0700)]
Minor tweaks, update relfunc behavior

12 years agoMerge remote branch 'origin/mdb.master'
Howard Chu [Mon, 12 Sep 2011 06:58:50 +0000 (23:58 -0700)]
Merge remote branch 'origin/mdb.master'

12 years agoMore cursor_init cleanup
Howard Chu [Mon, 12 Sep 2011 06:57:17 +0000 (23:57 -0700)]
More cursor_init cleanup

12 years agoOne more sub-cursor fix
Howard Chu [Mon, 12 Sep 2011 06:13:36 +0000 (23:13 -0700)]
One more sub-cursor fix

12 years agoMerge branch 'mdb.master' of ssh://git-master.openldap.org/~git/git/openldap into...
Howard Chu [Mon, 12 Sep 2011 05:23:35 +0000 (22:23 -0700)]
Merge branch 'mdb.master' of ssh://git-master.openldap.org/~git/git/openldap into mdb.master

12 years agoFix 2e3bc39fa94f21d692d8e94183f57aef9122c487
Howard Chu [Mon, 12 Sep 2011 03:54:32 +0000 (20:54 -0700)]
Fix 2e3bc39fa94f21d692d8e94183f57aef9122c487

Various mistakes when converting from previous data structures.
Add a few more debug asserts/sanity checks.
Split all "if (foo) return" constructs to separate lines to allow
easier breakpoint setting.

Add mtest6 for checking mdb_split() behavior. This needs to be
expanded to check rebalance/merge cases too.

12 years agoFix mdb debug formats
Hallvard Furuseth [Sun, 11 Sep 2011 11:00:52 +0000 (13:00 +0200)]
Fix mdb debug formats

12 years agoRestore missing LAZY_LOCKS semicolon.
Hallvard Furuseth [Sun, 11 Sep 2011 09:08:40 +0000 (11:08 +0200)]
Restore missing LAZY_LOCKS semicolon.

Lost in C90 compat commit c5dad7a6d0eb1b3597beda18b38fe92820df0d30.

12 years agomdb integer type cleanup: Use MDB_dbi consistently.
Hallvard Furuseth [Sat, 10 Sep 2011 08:11:56 +0000 (10:11 +0200)]
mdb integer type cleanup: Use MDB_dbi consistently.

This changes the prototype of mdb_env_set_maxdbs().

12 years agoDrop ULONG in favor of size_t.
Hallvard Furuseth [Sat, 10 Sep 2011 18:01:07 +0000 (20:01 +0200)]
Drop ULONG in favor of size_t.

12 years agoAdd mdb.c:txnid_t for readability.
Hallvard Furuseth [Sat, 10 Sep 2011 08:11:56 +0000 (10:11 +0200)]
Add mdb.c:txnid_t for readability.

Maybe later we'll test txnid wraparound with it defined to ushort.

12 years agomdb type cleanup: Consistent reader count types.
Hallvard Furuseth [Sat, 10 Sep 2011 08:11:56 +0000 (10:11 +0200)]
mdb type cleanup: Consistent reader count types.

Use unsigned int for reader counts/max limits, that's the smallest
change.  Don't need uint32_t when mdb_env_set_maxreaders() takes less.
Change prototypes of mdb_env_set_maxreaders,mdb_env_get_maxreaders().
Check the mdb_env_set_maxreaders() argument.

12 years agoexplain mdl_midl_sort() istack size
Hallvard Furuseth [Sat, 10 Sep 2011 08:11:55 +0000 (10:11 +0200)]
explain mdl_midl_sort() istack size

12 years agoFix memn(r)cmp of key sizes > INT_MAX. Simplify.
Hallvard Furuseth [Sat, 10 Sep 2011 08:11:55 +0000 (10:11 +0200)]
Fix memn(r)cmp of key sizes > INT_MAX.  Simplify.

12 years agoCheck some mdb integer type assumptions
Hallvard Furuseth [Sat, 10 Sep 2011 08:11:55 +0000 (10:11 +0200)]
Check some mdb integer type assumptions

12 years agoPut MDB_node.<mn_lo,mn_hi> in host byte order.
Hallvard Furuseth [Sat, 10 Sep 2011 08:11:55 +0000 (10:11 +0200)]
Put MDB_node.<mn_lo,mn_hi> in host byte order.

12 years agoC90 compatibility cleanup in mdb.
Hallvard Furuseth [Sat, 10 Sep 2011 08:11:55 +0000 (10:11 +0200)]
C90 compatibility cleanup in mdb.

Fix void* pointer arithmetic in cintcmp().
Fix invalid ';'s in declarations after possibly-empty macros.

12 years agoFix - slapcat doesn't set op->o_hdr for tmpmemctx
Howard Chu [Sat, 10 Sep 2011 08:12:50 +0000 (01:12 -0700)]
Fix - slapcat doesn't set op->o_hdr for tmpmemctx

12 years agoCleanup mdb macros.
Hallvard Furuseth [Sat, 10 Sep 2011 08:11:55 +0000 (10:11 +0200)]
Cleanup mdb macros.

Parenthesize.  Rename GetPageSize -> GET_PAGESIZE since it does not
behave like a function (it has a non-pointer output argument).

12 years agolibmdb/.gitignore += test[45], Doxygen output
Hallvard Furuseth [Sat, 10 Sep 2011 08:11:55 +0000 (10:11 +0200)]
libmdb/.gitignore += test[45], Doxygen output

12 years agoMerge branch 'mdb.master' of ssh://git-master.openldap.org/~git/git/openldap
Howard Chu [Sat, 10 Sep 2011 05:29:37 +0000 (22:29 -0700)]
Merge branch 'mdb.master' of ssh://git-master.openldap.org/~git/git/openldap

12 years agoFix out-of-order slapadd
Howard Chu [Sat, 10 Sep 2011 05:00:34 +0000 (22:00 -0700)]
Fix out-of-order slapadd

12 years agoIf put(NOOVERWRITE) exists, return existing data
Howard Chu [Sat, 10 Sep 2011 04:43:22 +0000 (21:43 -0700)]
If put(NOOVERWRITE) exists, return existing data

12 years agoFix bogus error codes
Howard Chu [Sat, 10 Sep 2011 02:53:56 +0000 (19:53 -0700)]
Fix bogus error codes

12 years agoMinor typos, additional clarification
Howard Chu [Fri, 9 Sep 2011 10:52:12 +0000 (03:52 -0700)]
Minor typos, additional clarification

12 years agoKeep cursor open for id2entry
Howard Chu [Fri, 9 Sep 2011 07:10:48 +0000 (00:10 -0700)]
Keep cursor open for id2entry

12 years agoAdd a few NULL checks to defend against dumb API checkers.
Howard Chu [Fri, 9 Sep 2011 06:41:06 +0000 (23:41 -0700)]
Add a few NULL checks to defend against dumb API checkers.

Unfortunately automated checkers don't seem to read the documentation
for how APIs are expected to be used, and the C declaration syntax
isn't expressive enough to encode the documented usage.

12 years agoUse tmpmem-based entries
Howard Chu [Fri, 9 Sep 2011 05:07:04 +0000 (22:07 -0700)]
Use tmpmem-based entries

12 years agoDrop referral.c
Howard Chu [Fri, 9 Sep 2011 05:02:59 +0000 (22:02 -0700)]
Drop referral.c

12 years agoMerge branch 'master' of ssh://git-master.openldap.org/~git/git/openldap
Howard Chu [Fri, 9 Sep 2011 04:42:58 +0000 (21:42 -0700)]
Merge branch 'master' of ssh://git-master.openldap.org/~git/git/openldap

12 years agoAdd Valgrind mempool support.
Howard Chu [Fri, 9 Sep 2011 04:39:45 +0000 (21:39 -0700)]
Add Valgrind mempool support.

Compile with -DUSE_VALGRIND. It will attempt to keep Valgrind
informed of our memory allocations. Frees are trickier since they
may be deferred indefinitely.

12 years agoPartial revert, fix MDB_page definition
Howard Chu [Fri, 9 Sep 2011 03:18:29 +0000 (20:18 -0700)]
Partial revert, fix MDB_page definition