ITS#2741 yield before backing off

This commit is contained in:
Howard Chu 2003-09-27 03:16:38 +00:00
parent 025f21c37b
commit 5c711a3b46
6 changed files with 7 additions and 8 deletions

View File

@ -102,8 +102,8 @@ retry: /* transaction retry */
rs->sr_text = "internal error";
goto return_results;
}
bdb_trans_backoff( ++num_retries );
ldap_pvt_thread_yield();
bdb_trans_backoff( ++num_retries );
}
/* begin transaction */

View File

@ -305,9 +305,8 @@ txn_retry:
rs->sr_err = LDAP_OTHER;
return rs->sr_err;
}
bdb_trans_backoff( ++num_retries );
ldap_pvt_thread_yield();
bdb_trans_backoff( ++num_retries );
}
rs->sr_err = TXN_BEGIN( bdb->bi_dbenv, NULL, &ltid, bdb->bi_db_opflags );
if ( rs->sr_err != 0 ) {

View File

@ -73,8 +73,8 @@ retry: /* transaction retry */
rs->sr_text = "internal error";
goto return_results;
}
bdb_trans_backoff( ++num_retries );
ldap_pvt_thread_yield();
bdb_trans_backoff( ++num_retries );
}
/* begin transaction */
@ -554,7 +554,7 @@ done:
if( e != NULL ) {
if ( rs->sr_err == LDAP_SUCCESS ) {
/* Free the EntryInfo and the Entry */
bdb_cache_delete_cleanup( e );
bdb_cache_delete_cleanup( &bdb->bi_cache, e );
} else {
bdb_unlocked_cache_return_entry_w(&bdb->bi_cache, e);
}

View File

@ -348,8 +348,8 @@ retry: /* transaction retry */
rs->sr_text = "internal error";
goto return_results;
}
bdb_trans_backoff( ++num_retries );
ldap_pvt_thread_yield();
bdb_trans_backoff( ++num_retries );
}
/* begin transaction */

View File

@ -109,8 +109,8 @@ retry: /* transaction retry */
rs->sr_text = "internal error";
goto return_results;
}
bdb_trans_backoff( ++num_retries );
ldap_pvt_thread_yield();
bdb_trans_backoff( ++num_retries );
}
/* begin transaction */

View File

@ -120,8 +120,8 @@ retry: /* transaction retry */
rs->sr_text = "internal error";
goto done;
}
bdb_trans_backoff( ++num_retries );
ldap_pvt_thread_yield();
bdb_trans_backoff( ++num_retries );
}
/* begin transaction */