Bug#316389: Please add the transactions patch to db4.2

2005-07-10 Thread Peter Marschall
Hi,

On Sunday 03 July 2005 19:43, Florian Weimer wrote:
 * Peter Marschall:
  You may find further finormation about this patch on Standord's
  Directory pages where it was first published (accoeding to my
  knowledge):
  http://www.stanford.edu/services/directory/openldap/configuration/openlda
 p-build-42.html

 The patch does not include any documentation.  What does it do?
 Has Sleepycat included it in later versions?

the patch is also available via: 
http://www.openldap.org/devel/cvsweb.cgi/build/

The version there contains the following documentation:

This patch is intended to be applied to Berkeley DB 4.2.52 and,
if applied, will automatically be used by slapd(8) back-bdb/hdb.
Without this patch the BDB DB_LOG_AUTOREMOVE option will not work,
nor will db_archive allow any transaction log files to be removed
while slapd is running.

The patch can be applied to the BDB source using patch(1) as follows
cd db-4.2.52
patch -p0  openldap-src/build/BerkeleyDB42.patch

(modify directory paths as necessary), then recompile and reinstall
the BerkeleyDB 4.2 library, and then build and install OpenLDAP
Software.

The patch should not be applied to Berkeley DB 4.3.

Further information can be found in the openLDAP FAQ-O-Matic:
http://www.openldap.org/faq/index.cgi?file=44

I am using this patch with my privately built db4.2 and openldap2.2
for several months without experiencing any problems (neither with openldap 
that makes use of this patch nor with other applications that use db4.2).

At Stanford this patch is in use even longer (this is where I got it from)
and Stanford's OpenLDAP maintainer who is very active on the OpenLDAP
mailing list did not mention any problems at all.

CU
Peter

-- 
Peter Marschall
eMail: [EMAIL PROTECTED]


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#316389: Please add the transactions patch to db4.2

2005-07-03 Thread Florian Weimer
* Peter Marschall:

 You may find further finormation about this patch on Standord's
 Directory pages where it was first published (accoeding to my
 knowledge):
 http://www.stanford.edu/services/directory/openldap/configuration/openldap-build-42.html

The patch does not include any documentation.  What does it do?
Has Sleepycat included it in later versions?


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#316389: Please add the transactions patch to db4.2

2005-06-30 Thread Peter Marschall
Package: db4.2
Severity: wishlist
Tags: patch

Hi,

please consider adding the transactions patch (attached) to db4.2.

This patch is recommended for OpenLDAP 2.2.6 and 2.2.27, while it is
required for all higher OpenLDAP versions (2.2.28 enginieering as well
as 2.3.x).

Accordung to OpenLDAP developers db4.2 is the recommended Berkeley DB
library for OpenLDAP. So not having this patch in Debian's db4.2
would hinder the further development of openldap2.x packages in Debian.

You may find further finormation about this patch on Standord's
Directory pages where it was first published (accoeding to my
knowledge):
http://www.stanford.edu/services/directory/openldap/configuration/openldap-build-42.html

As you can see the patch is quite trivial and does not affect
packages that are not aware of the flag introduced with this patch.
(BTW, I have db 4.2 with this patch running for half a year without any
problems [except the need to re-build my private package whenever a new
official package comes out ;-])

Please do not hesitate to to aks if you have any questions.

Thanks in advance
PEter


-- System Information:
Debian Release: testing/unstable
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.11-1-k7
Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] (charmap=ISO-8859-15)
## transactions.patch by Quanah Gibson-Mount [EMAIL PROTECTED]
##
## fixes transaction behaviour; required for openLDAP
##  published on Stanford's Directory Services pages:
##   http://www.stanford.edu/services/directory/openldap/configuration/openldap-build-42.html


--- dbinc/db.in
+++ dbinc/db.in	2004-09-09 18:30:00.547903000 -0700
@@ -839,6 +839,7 @@
 #define	TXN_NOWAIT	0x040		/* Do not wait on locks. */
 #define	TXN_RESTORED	0x080		/* Transaction has been restored. */
 #define	TXN_SYNC	0x100		/* Sync on prepare and commit. */
+#define	TXN_NOLOG	0x200		/* Do not log this transaction. */
 	u_int32_t	flags;
 };
 
--- txn/txn.c
+++ txn/txn.c	2004-09-09 18:32:14.559561000 -0700
@@ -127,7 +127,7 @@
 	if ((ret = __db_fchk(dbenv,
 	txn_begin, flags,
 	DB_DIRTY_READ | DB_TXN_NOWAIT |
-	DB_TXN_NOSYNC | DB_TXN_SYNC)) != 0)
+	DB_TXN_NOSYNC | DB_TXN_SYNC | DB_TXN_NOT_DURABLE )) != 0)
 		return (ret);
 	if ((ret = __db_fcchk(dbenv,
 	txn_begin, flags, DB_TXN_NOSYNC, DB_TXN_SYNC)) != 0)
@@ -193,6 +193,8 @@
 		F_SET(txn, TXN_SYNC);
 	if (LF_ISSET(DB_TXN_NOWAIT))
 		F_SET(txn, TXN_NOWAIT);
+	if (LF_ISSET(DB_TXN_NOT_DURABLE))
+		F_SET(txn, TXN_NOLOG);
 
 	if ((ret = __txn_begin_int(txn, 0)) != 0)
 		goto err;
@@ -328,7 +330,7 @@
 	 * We should set this value when we write the first log record, not
 	 * here.
 	 */
-	if (DBENV_LOGGING(dbenv))
+	if (DBENV_LOGGING(dbenv)  !F_ISSET(txn, TXN_NOLOG))
 		__log_txn_lsn(dbenv, begin_lsn, NULL, NULL);
 	else
 		ZERO_LSN(begin_lsn);