]> git.sur5r.net Git - openldap/commitdiff
ITS#2741 yield before backing off
authorHoward Chu <hyc@openldap.org>
Sat, 27 Sep 2003 03:16:38 +0000 (03:16 +0000)
committerHoward Chu <hyc@openldap.org>
Sat, 27 Sep 2003 03:16:38 +0000 (03:16 +0000)
servers/slapd/back-bdb/add.c
servers/slapd/back-bdb/ctxcsn.c
servers/slapd/back-bdb/delete.c
servers/slapd/back-bdb/modify.c
servers/slapd/back-bdb/modrdn.c
servers/slapd/back-bdb/passwd.c

index 14fa8bd4778ccf0bd967339237fd177b82393ec2..551a8813c18cbb77ea7845160dd633e2b84c053f 100644 (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 */
index 182ad7bb3e756609bb20fd89627aae1149bd3ed5..3f9dfc1f6173eb63518f3f6ddcba97fcf229fdd6 100644 (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 ) {
index 945099b5ce8a17cdab4d30ebcc1ac5ea2c809595..9acab3aa189d8b30a0081d4fbab07bff613531ce 100644 (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);
                }
index 61cb5f79084eedfdfdb10e333356d3bdf2834bcd..71c80ec79881101a0c14c1468ae9d098866d748d 100644 (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 */
index b744b98ffeb10ea04c7951dc25d19e79c47e9a47..ff4dab5a725fcb026252b088d93ee3e76a720375 100644 (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 */
index e8ca8f70f76434e4aa7bc107504b4ce084057a03..890481c123785582aa59c001dbceaf77874478db 100644 (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 */