]> git.sur5r.net Git - openldap/commitdiff
Fix? For bdb_cache_find_entry*, COMMITTED entries are usable, not just
authorHoward Chu <hyc@openldap.org>
Sat, 22 Feb 2003 12:39:49 +0000 (12:39 +0000)
committerHoward Chu <hyc@openldap.org>
Sat, 22 Feb 2003 12:39:49 +0000 (12:39 +0000)
READY entries. This change eliminates a retry bottleneck, and looks safe
to me, but please review.

servers/slapd/back-bdb/cache.c

index ad98106a69783ffd9ccbc5fc6f31b6d745e908b0..ef753b29e1c93a187937ac76edeeb96457f7b911 100644 (file)
@@ -794,7 +794,7 @@ try_again:
                /*
                 * entry is deleted or not fully created yet
                 */
-               if ( state != CACHE_ENTRY_READY ) {
+               if ( state != CACHE_ENTRY_READY && state != CACHE_ENTRY_COMMITTED ) {
                        assert(state != CACHE_ENTRY_UNDEFINED);
 
                        /* free cache read lock */
@@ -889,7 +889,7 @@ try_again:
                /*
                 * entry is deleted or not fully created yet
                 */
-               if ( state != CACHE_ENTRY_READY ) {
+               if ( state != CACHE_ENTRY_READY && state != CACHE_ENTRY_COMMITTED ) {
 
                        assert(state != CACHE_ENTRY_UNDEFINED);