From a5c51f3004b910a35494df6278fdce486a09651c Mon Sep 17 00:00:00 2001 From: Ludwig Krispenz Date: Fri, 14 Mar 2014 15:07:49 +0100 Subject: [PATCH] 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: ? --- ldap/servers/slapd/back-ldbm/index.c | 3 +++ 1 file changed, 3 insertions(+) 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; -- 1.7.11.7