Commit Graph

20666 Commits

Author SHA1 Message Date
Howard Chu
970e7f8199 ITS#7416 make sure to reopen attr DBs after env reopen 2012-10-11 16:45:42 -07:00
Howard Chu
ebb6859ea5 Add mdb_copy for backing up a DB environment 2012-10-11 12:24:01 -07:00
Howard Chu
1b393b7421 ITS#7411 delete trailing whitespace in ldap_get_option.3 2012-10-11 08:37:33 -07:00
Howard Chu
d42c7c4937 ITS#7414 fix slapo-rwm modrdn cleanup
newSup is NULL if it was specified, but same as old Sup.
2012-10-11 07:59:06 -07:00
Hallvard Furuseth
756ce8e10c Tweak MDB restrictions 2012-10-03 21:13:21 +02:00
Howard Chu
c1800082cc ITS#7403, #6296 fix AUTHZ_BACKEND handling
c_authz_cookie should only be set on explicit Bind requests.
2012-10-03 09:12:14 -07:00
Hallvard Furuseth
a3f33dd20e Fix mdb_open() off-by-one error in maxdbs check 2012-10-03 18:08:56 +02:00
Hallvard Furuseth
38fb8e6eb1 ITS#7377 Wrap fcntl F_SETLK in EINTR loop too.
This can happen even on local filesystems.
2012-10-03 18:06:29 +02:00
Hallvard Furuseth
ab3fea51dc ITS#7377 Catch ftruncate() error 2012-10-03 18:06:29 +02:00
Hallvard Furuseth
2b960613e0 ITS#7377 Document caveats/troubeshooting. 2012-10-03 18:04:07 +02:00
Howard Chu
0fc0ccdc0c Merge remote-tracking branch 'origin/mdb.master' 2012-09-30 10:03:21 -07:00
Howard Chu
7333b6bdc9 Fix prev commit
It only worked if the freelist was already non-empty
2012-09-30 10:01:57 -07:00
Howard Chu
b0ad9e76c7 Merge remote-tracking branch 'origin/mdb.master' 2012-09-30 07:50:56 -07:00
Howard Chu
cd228b4722 Fix mdb_drop
if it was the only operation in a txn, it would be ignored.
2012-09-30 07:49:30 -07:00
Jan Synacek
96b994e6dd ITS#7366 Update slapo-constraint tests 2012-09-28 10:21:26 -07:00
Howard Chu
a1c2dc66db Merge remote-tracking branch 'origin/mdb.master' 2012-09-27 05:07:24 -07:00
Howard Chu
0c4c6fe72a ITS#7385, check further for bad splits
More for 48ef27b6f5
Our definition of "large" data item needs to be smaller to
handle more cases where a bad split is possible
2012-09-27 05:06:23 -07:00
Howard Chu
560a9f03f9 ITS#7405 note refint is not replicated 2012-09-27 03:10:46 -07:00
Quanah Gibson-Mount
6a435736fb Fix MDB objectClass so that MDB will load 2012-09-26 16:48:57 -07:00
Howard Chu
d7c964fedb ITS#7403 fix idassert non-override mode 2012-09-26 09:29:57 -07:00
Howard Chu
d426cafaca More for envflags
If trying to alter a non-resettable flag, just close/reopen the env.
2012-09-25 04:37:29 -07:00
Howard Chu
dc9ef835c5 Add envflags for MDB config
allows setting writemap and some other useful flags
2012-09-25 04:31:37 -07:00
Howard Chu
2a68553ec1 Merge remote-tracking branch 'origin/mdb.master' 2012-09-19 06:16:36 -07:00
Howard Chu
ba6c3281a1 Add MDB_GET_CURRENT
return whatever the cursor is currently pointing at
2012-09-19 06:15:09 -07:00
Howard Chu
753992c39b Regenerate for cb1b9e2a3e 2012-09-18 14:40:42 -07:00
Howard Chu
c264d70fbe Merge remote-tracking branch 'origin/mdb.master' 2012-09-18 12:37:59 -07:00
Howard Chu
d13ca0de4f ITS#7394 ignore WRITEMAP if RDONLY 2012-09-18 12:36:54 -07:00
Howard Chu
b8e48e95fb Merge remote-tracking branch 'origin/mdb.master' 2012-09-17 08:21:20 -07:00
Howard Chu
0a359fb629 More for 48ef27b6f5
page_split with newindex > split_indx
2012-09-17 07:02:41 -07:00
Howard Chu
5ef56b437e More for ab04c50a32
Use explicit MDB_RDONLY flag
2012-09-17 07:01:28 -07:00
Hallvard Furuseth
c67ea9c060 ITS#7377 Catch MDB user errors. 2012-09-17 15:42:15 +02:00
Hallvard Furuseth
c0f3d9b9a8 ITS#7377 Catch MDB setup errors and clean up. 2012-09-17 15:42:15 +02:00
Hallvard Furuseth
fe1b3794de ITS#7364 Limit mdb lock upgrade before sem_unlink.
Do not try shared lock when closing or after error.  Track file lock
state to decide.  Change meaning of *excl to reflect file lock state.
2012-09-17 15:42:15 +02:00
Hallvard Furuseth
c760e536ec ITS#7364 Always sem_unlink() in mdb_env_open().
Drop the sem_unlink() error checks, which could prevent the 2nd
unlink.  Instead use O_EXCL in sem_open().

This makes "open+close the database" the API for trying to clean
away the old semaphores, if they were left behind by a previous run.
2012-09-17 15:42:15 +02:00
Hallvard Furuseth
31be24896b ITS#7377 Wrap sem_wait & file locks in EINTR loops 2012-09-17 15:42:14 +02:00
Hallvard Furuseth
a35f9b2a53 Remove mdb data races. Use (txnid_t)-1 as "no ID".
Avoid race between numreaders++ and reading numreaders at cleanup. Make
the un-mutexed reset of reader table entry, atomic: Reset mr_pid only.

Instead check mr_pid != 0 in mdb_page_alloc()'s scan for readers.
(txnid_t)-1 as "no ID"-mark avoids a check for mr_txnid != 0.
The scan can stop when seeing an old reader.
2012-09-17 15:42:14 +02:00
Hallvard Furuseth
38cc1e96b4 Save pid in MDB_env instead of repeating getpid().
An open MDB environment does not survive or catch fork(),
so repeating getpid() was pointless.
2012-09-17 15:42:14 +02:00
Hallvard Furuseth
20a216fcc9 MDB_WRITEMAP needs no DSYNC descriptor (me_mfd) 2012-09-17 15:42:14 +02:00
Hallvard Furuseth
588a84a5ae ITS#7363 Preprocessor namespace cleanup.
Rename USE_POSIX_SEM to MDB_USE_POSIX_SEM.
Separate MDB_FDATASYNC from MDB_USE_POSIX_SEM.
2012-09-17 15:42:14 +02:00
Howard Chu
8bb10add24 More for ab04c50a32
Fix typos, error code ranges
2012-09-17 06:35:03 -07:00
Howard Chu
acbff5b1ea Add mdb_cursor_renew()
Allow cursors on read-only txns to be reused with later txns.
2012-09-17 04:41:13 -07:00
Howard Chu
076b2b36a9 Shared lib should depend on pthread 2012-09-17 03:48:54 -07:00
Howard Chu
c542442c9f Add MDB_SET_KEY cursor op
Overwrites the passed in key with the DB's key
2012-09-17 02:17:25 -07:00
Howard Chu
3e47e825fd ITS#7391 more for ab04c50a32 2012-09-14 12:53:47 -07:00
Howard Chu
867134d4ca ITS#7390 fix slapd_rw_destroy 2012-09-14 09:27:40 -07:00
Howard Chu
ad79308d5a Merge remote-tracking branch 'origin/mdb.master' 2012-09-14 06:52:37 -07:00
Howard Chu
ab04c50a32 ITS#7383 More explicit error codes 2012-09-14 06:51:31 -07:00
Howard Chu
bdef02832e ITS#7386 close read txn in reindex commit 2012-09-12 13:37:22 -07:00
Howard Chu
c2bd7e630d Merge remote-tracking branch 'origin/mdb.master' 2012-09-12 10:47:36 -07:00
Howard Chu
48ef27b6f5 ITS#7385 fix mdb_page_split (again)
More for d793594173 ITS#7229
2012-09-12 10:45:51 -07:00