Browse Source

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
Ludwig Krispenz 11 năm trước cách đây
mục cha
commit
572ae729cc
1 tập tin đã thay đổi với 3 bổ sung0 xóa
  1. 3 0
      ldap/servers/slapd/back-ldbm/index.c

+ 3 - 0
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;