From: Howard Chu Date: Sat, 27 Sep 2003 03:16:38 +0000 (+0000) Subject: ITS#2741 yield before backing off X-Git-Tag: OPENLDAP_REL_ENG_2_1_MP~647 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=5c711a3b4649c3c58b850189a04218bb3bc635d4;p=openldap ITS#2741 yield before backing off --- diff --git a/servers/slapd/back-bdb/add.c b/servers/slapd/back-bdb/add.c index 14fa8bd477..551a8813c1 100644 --- a/servers/slapd/back-bdb/add.c +++ b/servers/slapd/back-bdb/add.c @@ -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 */ diff --git a/servers/slapd/back-bdb/ctxcsn.c b/servers/slapd/back-bdb/ctxcsn.c index 182ad7bb3e..3f9dfc1f61 100644 --- a/servers/slapd/back-bdb/ctxcsn.c +++ b/servers/slapd/back-bdb/ctxcsn.c @@ -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 ) { diff --git a/servers/slapd/back-bdb/delete.c b/servers/slapd/back-bdb/delete.c index 945099b5ce..9acab3aa18 100644 --- a/servers/slapd/back-bdb/delete.c +++ b/servers/slapd/back-bdb/delete.c @@ -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); } diff --git a/servers/slapd/back-bdb/modify.c b/servers/slapd/back-bdb/modify.c index 61cb5f7908..71c80ec798 100644 --- a/servers/slapd/back-bdb/modify.c +++ b/servers/slapd/back-bdb/modify.c @@ -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 */ diff --git a/servers/slapd/back-bdb/modrdn.c b/servers/slapd/back-bdb/modrdn.c index b744b98ffe..ff4dab5a72 100644 --- a/servers/slapd/back-bdb/modrdn.c +++ b/servers/slapd/back-bdb/modrdn.c @@ -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 */ diff --git a/servers/slapd/back-bdb/passwd.c b/servers/slapd/back-bdb/passwd.c index e8ca8f70f7..890481c123 100644 --- a/servers/slapd/back-bdb/passwd.c +++ b/servers/slapd/back-bdb/passwd.c @@ -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 */