mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-24 13:24:56 +08:00
ITS#2741 yield before backing off
This commit is contained in:
parent
025f21c37b
commit
5c711a3b46
@ -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 */
|
||||
|
@ -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, <id, bdb->bi_db_opflags );
|
||||
if ( rs->sr_err != 0 ) {
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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 */
|
||||
|
@ -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 */
|
||||
|
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user