ldap/servers/slapd/back-ldbm/index.c | 3 +++
1 file changed, 3 insertions(+)
New commits:
commit 572ae729cce2518288263172e57ce69a585af9fe
Author: Ludwig Krispenz <lkrispen(a)redhat.com>
Date: Fri Mar 14 15:07:49 2014 +0100
Ticket 47733 - ds logs many "Operation error fetching Null DN" messages
Bug Description: in ipa tests there are many of the above
messages logged. The reason is that
in txn access to database for a locked
page DB_DEADLOCK is detected and
after a few retries the error is logged.
for more info cf to the ticket
Fix Description: introduce a sleep in th eretry loop to get a chance that
th epage will be released
https://fedorahosted.org/389/ticket/47733
Reviewed by: richm,thanks
diff --git a/ldap/servers/slapd/back-ldbm/index.c b/ldap/servers/slapd/back-ldbm/index.c
index 7189d9f..5610b49 100644
--- a/ldap/servers/slapd/back-ldbm/index.c
+++ b/ldap/servers/slapd/back-ldbm/index.c
@@ -1051,12 +1051,15 @@ index_read_ext_allids(
}
for (retry_count = 0; retry_count < IDL_FETCH_RETRY_COUNT; retry_count++) {
*err = NEW_IDL_DEFAULT;
+ PRIntervalTime interval;
idl = idl_fetch_ext( be, db, &key, db_txn, ai, err, allidslimit );
if(*err == DB_LOCK_DEADLOCK) {
ldbm_nasty("index read retrying transaction", 1045, *err);
#ifdef FIX_TXN_DEADLOCKS
#error can only retry here if txn == NULL - otherwise, have to abort and retry txn
#endif
+ interval = PR_MillisecondsToInterval(slapi_rand() % 100);
+ DS_Sleep(interval);
continue;
} else {
break;