From bc61ed7dc8a35bb7edc813d81994e2218144fd95 Mon Sep 17 00:00:00 2001 From: Ludwig Krispenz Date: Mar 14 2014 16:01:09 +0000 Subject: 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;