[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: BDB transactions patch



Quanah Gibson-Mount wrote:

In the OL 2.2 tree, I would apply the following transactions patch to back-bdb:

--- openldap-2.2.18/servers/slapd/back-bdb/cache.c.orig 2004-10-08 21:26:50.000000000 -0700
+++ openldap-2.2.18/servers/slapd/back-bdb/cache.c 2004-11-08 16:18:00.734351000 -0800
@@ -1187,7 +1187,7 @@


if ( ldap_pvt_thread_pool_getkey( ctx, ((char *)env)+1, &data, NULL ) ) {
for ( i=0, rc=1; rc != 0 && i<4; i++ ) {
- rc = TXN_BEGIN( env, NULL, txn, 0 );
+ rc = TXN_BEGIN( env, NULL, txn, DB_TXN_NOT_DURABLE );
if (rc) ldap_pvt_thread_yield();
}
if ( rc != 0) {


These two snippets of code come from two completely different functions, so the change you mention above has nothing to do with the code you quote below.

The change you list above will not be committed into 2.2 since it will completely break on an unpatched BerkeleyDB library.

However, in HEAD, the "if" statement has changed quite a bit:


if ( ldap_pvt_thread_pool_getkey( ctx, env, &data, NULL ) ) { for ( i=0, rc=1; rc != 0 && i<4; i++ ) { rc = XLOCK_ID( env, &lockid ); if (rc) ldap_pvt_thread_yield(); } if ( rc != 0) {


I'm guessing then that this patch is not relevant when using 2.3/HEAD?

You're not comparing apples to apples here, you're looking at the wrong code.


--
 -- Howard Chu
 Chief Architect, Symas Corp.       Director, Highland Sun
 http://www.symas.com               http://highlandsun.com/hyc
 Symas: Premier OpenSource Development and Support