]>
git.sur5r.net Git - openldap/log
Howard Chu [Sat, 2 Jun 2012 12:26:31 +0000 (05:26 -0700)]
Tweak prev commit, use first unused slot
Howard Chu [Sat, 2 Jun 2012 12:24:47 +0000 (05:24 -0700)]
Fix mdb_open, re-use closed dbi slots
Howard Chu [Wed, 9 May 2012 18:24:25 +0000 (11:24 -0700)]
ITS#7266 fix rebalance for LEAF2 pages
Howard Chu [Wed, 9 May 2012 05:17:17 +0000 (22:17 -0700)]
More freelist tweaks, avoid referencing freed page
Howard Chu [Sun, 6 May 2012 02:41:45 +0000 (19:41 -0700)]
Further clarification of mdb_open()
Howard Chu [Wed, 18 Apr 2012 22:59:54 +0000 (15:59 -0700)]
ITS#7251 fix Apple/Windows shared mutex naming
Hallvard Furuseth [Thu, 12 Apr 2012 05:34:14 +0000 (07:34 +0200)]
libmdb: midl.h namespace cleanup.
Prefix ID, NOID, ID2, IDL, ID2L with 'MDB_'.
Also drop bdb from file description.
Hallvard Furuseth [Thu, 12 Apr 2012 05:34:14 +0000 (07:34 +0200)]
libmdb: Simplify pick_meta() from read_meta().
Put one call in #if MDB_DEBUG. Move DPRINTF(Using meta page #) there.
Hallvard Furuseth [Thu, 12 Apr 2012 05:34:14 +0000 (07:34 +0200)]
libmdb: Simplify mdb_default_cmp. No real change.
Hallvard Furuseth [Thu, 12 Apr 2012 05:34:13 +0000 (07:34 +0200)]
libmdb: signed meets unsigned warning cleanup
Hallvard Furuseth [Thu, 12 Apr 2012 05:34:13 +0000 (07:34 +0200)]
libmdb: MDB_FDATASYNC code cleanup.
Define MDB_FDATASYNC() instead of redefining fdatasync().
Hallvard Furuseth [Thu, 12 Apr 2012 05:34:13 +0000 (07:34 +0200)]
libmdb: Add C++ 'extern "C" {}' to *.h
Hallvard Furuseth [Thu, 12 Apr 2012 05:34:13 +0000 (07:34 +0200)]
libmdb: Don't open datafile twice when not needed.
If the database is opened with MDB_RDONLY or MDB_NOSYNC,
instead use the same file descriptor for me_mfd and me_fd.
Also factor out Windows/Unix error handling after open.
Hallvard Furuseth [Thu, 12 Apr 2012 05:34:13 +0000 (07:34 +0200)]
libmdb: Set close-on-exec flag on lockfile
Hallvard Furuseth [Thu, 12 Apr 2012 05:34:13 +0000 (07:34 +0200)]
libmdb: Do not use the MDB_txbody.mtb_txnid field.
Get txn->mt_txnid from the meta page instead. Otherwise it
and txn->mt_toggle could become inconsistent, since read-only
txns fetched both from MDB_txbody without mutex proteciton.
Hallvard Furuseth [Thu, 12 Apr 2012 05:34:13 +0000 (07:34 +0200)]
Fix MDB_DEBUG in last ITS#7299 commit.
Make DPRINTF usable in if-else. Silence signed vs unsigned warning.
Howard Chu [Tue, 10 Apr 2012 21:05:05 +0000 (14:05 -0700)]
ITS#7229 more mdb_page_split tweaks
Also add mdb_debug/mdb_debug_start to toggle debug output at runtime
Howard Chu [Tue, 10 Apr 2012 02:24:47 +0000 (19:24 -0700)]
ITS#7210 fix check for freelist changes
Was being fooled before because the newly malloc'd block had
the same address as the previously freed block.
Howard Chu [Mon, 9 Apr 2012 12:01:37 +0000 (05:01 -0700)]
ITS#7238 doc clarification
Howard Chu [Mon, 9 Apr 2012 11:45:32 +0000 (04:45 -0700)]
ITS#7229 additional tweaks
Should probably compare nsize to pg_size/4 instead...
Howard Chu [Mon, 9 Apr 2012 11:44:08 +0000 (04:44 -0700)]
ITS#7230 check and strip 0 length IDLs from freelist
Howard Chu [Sat, 7 Apr 2012 08:27:38 +0000 (01:27 -0700)]
ITS#7229 more mdb_page_split fixes
Howard Chu [Wed, 4 Apr 2012 12:22:26 +0000 (05:22 -0700)]
ITS#7219 fixup keysize in previous commit
Howard Chu [Tue, 3 Apr 2012 19:24:27 +0000 (12:24 -0700)]
ITS#7219 fix for odd-aligned keys in mdb_update_key()
Howard Chu [Fri, 30 Mar 2012 13:36:02 +0000 (06:36 -0700)]
ITS#7210 fix leak of overflow pages in freelist
Howard Chu [Wed, 28 Mar 2012 17:44:18 +0000 (10:44 -0700)]
Partial revert of prev commit
Sub-DBs were correct before
Howard Chu [Wed, 28 Mar 2012 17:34:35 +0000 (10:34 -0700)]
Fix entry counts in cursor_put
when replacing an existing item
Howard Chu [Wed, 28 Mar 2012 16:33:06 +0000 (09:33 -0700)]
Fix uninit'd xcursor index
Howard Chu [Wed, 28 Mar 2012 16:20:18 +0000 (09:20 -0700)]
Add mfree utility to show the freelist
Howard Chu [Tue, 27 Mar 2012 17:42:22 +0000 (10:42 -0700)]
ITS#7210 additional freelist fixes
Also allow read access to freelist in mdb_cursor_open
Howard Chu [Tue, 27 Mar 2012 13:44:28 +0000 (06:44 -0700)]
ITS#7210 partial fix
Allow pages from free list to be used when growing the free list.
(Yes, this is self-referential...)
Howard Chu [Mon, 26 Mar 2012 13:58:16 +0000 (06:58 -0700)]
ITS#7213 fix page_split with MDB_APPEND
don't skip the cursor adjust checks
Howard Chu [Wed, 21 Mar 2012 00:14:59 +0000 (17:14 -0700)]
Update overflow page count when freeing overflow page
Hallvard Furuseth [Fri, 9 Mar 2012 18:30:34 +0000 (19:30 +0100)]
Fix MDB_txninfo.mt2 padding on Windows/Apple
Hallvard Furuseth [Fri, 9 Mar 2012 18:25:44 +0000 (19:25 +0100)]
Tweak mdb comment with conflicting spec of 'ID'
Hallvard Furuseth [Fri, 9 Mar 2012 18:22:31 +0000 (19:22 +0100)]
Fix valgrind call after malloc failure in mdb.
Also line up the code logic a bit.
Hallvard Furuseth [Fri, 9 Mar 2012 18:06:04 +0000 (19:06 +0100)]
Clean up MAP_FAILED handling in mdb.
Delay (MDB_txninfo*) cast to after comparing mmap() with MAP_FAILED.
Otherwise, if MAP_FAILED = (void*)-1 but MDB_txninfo requires stricter
alignment, the compiler could assume the result is never MAP_FAILED.
Also store NULL in env->(me_map, me_txns) after mmap failure.
Hallvard Furuseth [Fri, 9 Mar 2012 17:45:39 +0000 (18:45 +0100)]
ITS#7191 Align dirty MDB pages on the stack
Howard Chu [Fri, 9 Mar 2012 05:28:24 +0000 (21:28 -0800)]
ITS#7191 more alignment tweaks
Revealed when gcc optimization is enabled
Howard Chu [Wed, 7 Mar 2012 06:55:53 +0000 (22:55 -0800)]
Howard Chu [Wed, 7 Mar 2012 06:12:21 +0000 (22:12 -0800)]
ITS#7190 fix merging of branch pages in deletes
Hallvard Furuseth [Sun, 25 Sep 2011 21:36:49 +0000 (23:36 +0200)]
Fix libmdb comments
Hallvard Furuseth [Sat, 3 Mar 2012 08:52:33 +0000 (09:52 +0100)]
Remove development file libmdb/make.sh
Hallvard Furuseth [Sat, 3 Mar 2012 08:49:20 +0000 (09:49 +0100)]
ITS#7191 Fix mdb_xcursor_init1() unaligned access
Howard Chu [Sat, 3 Mar 2012 01:26:49 +0000 (17:26 -0800)]
ITS#7196 use IOV_MAX if it's defined and small
Howard Chu [Tue, 21 Feb 2012 19:52:01 +0000 (11:52 -0800)]
ITS#7160 get BYTE_ORDER def for HPUX (and Solaris)
Howard Chu [Sun, 22 Jan 2012 01:31:23 +0000 (17:31 -0800)]
Howard Chu [Sat, 21 Jan 2012 16:22:59 +0000 (08:22 -0800)]
Add valgrind support with -DUSE_VALGRIND
Track allocations and invalid accesses to freed tmp pages.
Howard Chu [Sat, 21 Jan 2012 16:20:43 +0000 (08:20 -0800)]
txn_commit must abort txn before returning errors
Fix for failure when committing a txn that is a child of
some parent txn.
Howard Chu [Sat, 21 Jan 2012 16:18:37 +0000 (08:18 -0800)]
ITS#7121 fix page splits when newindx == 0
Howard Chu [Sat, 21 Jan 2012 16:12:56 +0000 (08:12 -0800)]
ITS#7126 fix cursor tracking code
Don't compare cursors that aren't deep enough to match the
current cursor.
Howard Chu [Sat, 21 Jan 2012 16:07:56 +0000 (08:07 -0800)]
Happy New Year!
Howard Chu [Wed, 4 Jan 2012 23:25:18 +0000 (15:25 -0800)]
ITS#7121 fix page splits when data+key size is too large
Kurt Zeilenga [Sun, 1 Jan 2012 15:07:45 +0000 (07:07 -0800)]
Happy New Year!
Howard Chu [Fri, 18 Nov 2011 23:43:55 +0000 (15:43 -0800)]
Add $(SOLIBS) macro for shared lib dependencies
Howard Chu [Tue, 15 Nov 2011 19:23:00 +0000 (11:23 -0800)]
More s/DEBUG/MDB_DEBUG/
Howard Chu [Tue, 15 Nov 2011 00:21:59 +0000 (16:21 -0800)]
Alignment fixes for debug msgs
Howard Chu [Mon, 14 Nov 2011 22:40:43 +0000 (14:40 -0800)]
s/DEBUG/MDB_DEBUG/
Howard Chu [Fri, 11 Nov 2011 20:49:11 +0000 (12:49 -0800)]
Add MDB_FDATASYNC to allow override to fsync if needed.
Howard Chu [Fri, 11 Nov 2011 18:59:27 +0000 (10:59 -0800)]
Use <inttypes.h> instead of <stdint.h>
Howard Chu [Thu, 10 Nov 2011 20:41:34 +0000 (12:41 -0800)]
Fix size check
Howard Chu [Wed, 9 Nov 2011 23:32:37 +0000 (15:32 -0800)]
More Solaris warning cleanup
Howard Chu [Wed, 9 Nov 2011 08:36:50 +0000 (00:36 -0800)]
More pgno alignment tweaks
Howard Chu [Wed, 9 Nov 2011 04:05:29 +0000 (20:05 -0800)]
Add dummy DKEY define
Howard Chu [Wed, 9 Nov 2011 03:04:39 +0000 (19:04 -0800)]
Add Solaris byte-order detection
Howard Chu [Wed, 9 Nov 2011 00:45:45 +0000 (16:45 -0800)]
Fix mdb_drop return
Howard Chu [Sat, 15 Oct 2011 05:03:46 +0000 (22:03 -0700)]
Android/ARM portability
2-byte alignment isn't good enough for subpages
Howard Chu [Fri, 7 Oct 2011 01:53:07 +0000 (18:53 -0700)]
Fix page_split with MDB_RESERVE
Howard Chu [Thu, 6 Oct 2011 23:11:25 +0000 (16:11 -0700)]
Fix subcursor initialization
Howard Chu [Tue, 4 Oct 2011 01:02:17 +0000 (18:02 -0700)]
Don't use Append mode when splits are caused by sub-page inserts
Sub-pages need room to grow...
Howard Chu [Mon, 3 Oct 2011 19:40:53 +0000 (12:40 -0700)]
Fix freelist bug on page split
NULL out env->pghead before writing it, so that its pages can't be used
to satisfy the write.
Howard Chu [Mon, 3 Oct 2011 18:25:31 +0000 (11:25 -0700)]
Add rudimentary MDB_MULTIPLE support for puts
Only for DUPFIXED DBs. Still could do better.
Howard Chu [Mon, 3 Oct 2011 04:27:07 +0000 (21:27 -0700)]
Add MDB_APPEND to avoid splitting full pages
Howard Chu [Mon, 3 Oct 2011 02:52:12 +0000 (19:52 -0700)]
Howard Chu [Mon, 3 Oct 2011 02:27:31 +0000 (19:27 -0700)]
Add mdb_cursor_txn() and mdb_cursor_dbi() for querying the cursor
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.)
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
Howard Chu [Fri, 30 Sep 2011 04:07:07 +0000 (21:07 -0700)]
Make sure mdb_open actually got a sub-db record
Howard Chu [Fri, 23 Sep 2011 04:46:12 +0000 (21:46 -0700)]
Doc for the MDB_NOSUBDIR env 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.
Howard Chu [Thu, 22 Sep 2011 11:34:40 +0000 (04:34 -0700)]
Reader table notes
Howard Chu [Thu, 22 Sep 2011 00:21:48 +0000 (17:21 -0700)]
assert cleanup
Howard Chu [Wed, 21 Sep 2011 23:37:29 +0000 (16:37 -0700)]
txn_abort/commit free all their cursors now.
Howard Chu [Wed, 21 Sep 2011 23:06:52 +0000 (16:06 -0700)]
Only free malloc'd 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.
Howard Chu [Tue, 20 Sep 2011 19:57:05 +0000 (12:57 -0700)]
Add support for nested transactions.
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.
Howard Chu [Mon, 19 Sep 2011 01:26:54 +0000 (18:26 -0700)]
Additional fix for prev commit
Howard Chu [Mon, 19 Sep 2011 01:13:23 +0000 (18:13 -0700)]
Make sure 2 subpages fit in one real page
Howard Chu [Mon, 19 Sep 2011 00:07:47 +0000 (17:07 -0700)]
Fix last delete from a subpage
Howard Chu [Sun, 18 Sep 2011 23:39:18 +0000 (16:39 -0700)]
Fix
09006ccec7928c9cf53bca6abe741e8d4d466c98
Check for stale DBs was in the wrong place.
Howard Chu [Sun, 18 Sep 2011 21:18:27 +0000 (14:18 -0700)]
Fix mdb_drop() if not deleting the DB record
Howard Chu [Sun, 18 Sep 2011 20:28:08 +0000 (13:28 -0700)]
Fix typo, minor cleanup
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.
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).
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.
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
Howard Chu [Thu, 15 Sep 2011 03:33:09 +0000 (20:33 -0700)]
Doc tweak - txn flags
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.
Howard Chu [Wed, 14 Sep 2011 18:31:27 +0000 (11:31 -0700)]
Add MacOSX support
mmap() with FIXEDMAP fails, otherwise things work.