]> git.sur5r.net Git - openldap/commitdiff
ITS#3358 - make bdb_cache_lru_add skip entries that are being deleted
authorHoward Chu <hyc@openldap.org>
Wed, 27 Oct 2004 14:01:12 +0000 (14:01 +0000)
committerHoward Chu <hyc@openldap.org>
Wed, 27 Oct 2004 14:01:12 +0000 (14:01 +0000)
servers/slapd/back-bdb/cache.c

index bea7cf63b3bf73f195bc48419b003c26367613c2..5c6b3375e99c7ee7f2112fb9cd510e92662c549b 100644 (file)
@@ -527,9 +527,10 @@ bdb_cache_lru_add(
                                lockp ) == 0 ) {
                                /* If there's no entry, or this node is in
                                 * the process of linking into the cache,
-                                * skip it.
+                                * or this node is being deleted, skip it.
                                 */
-                               if ( !elru->bei_e || (elru->bei_state & CACHE_ENTRY_NOT_LINKED) ) {
+                               if ( !elru->bei_e || (elru->bei_state & 
+                                       ( CACHE_ENTRY_NOT_LINKED | CACHE_ENTRY_DELETED ))) {
                                        bdb_cache_entry_db_unlock( bdb->bi_dbenv, lockp );
                                        continue;
                                }