]> git.sur5r.net Git - openldap/commitdiff
Context CSN patch (1) - cleanup
authorJong Hyuk Choi <jongchoi@openldap.org>
Mon, 25 Aug 2003 17:10:18 +0000 (17:10 +0000)
committerJong Hyuk Choi <jongchoi@openldap.org>
Mon, 25 Aug 2003 17:10:18 +0000 (17:10 +0000)
- serialize search_candidates() with the read of search_context_csn

servers/slapd/back-bdb/search.c

index 80020c29a0e13d74c81c5f124b9eed1ac1bff6dd..9f8e1228a72920eccb78da9b375ed76653b0670d 100644 (file)
@@ -707,8 +707,6 @@ dn2entry_retry:
                } else {
                        search_context_csn = NULL;
                }
-
-               bdb_cache_entry_db_unlock( bdb->bi_dbenv, &ctxcsn_lock );
        }
 #endif
 
@@ -722,6 +720,12 @@ dn2entry_retry:
                rs->sr_err = search_candidates( op, sop, rs, &base, locker, candidates, scopes );
        }
 
+#ifdef LDAP_SYNC
+       if ( sop->o_sync_mode != SLAP_SYNC_NONE ) {
+               bdb_cache_entry_db_unlock( bdb->bi_dbenv, &ctxcsn_lock );
+       }
+#endif
+
        /* start cursor at beginning of candidates.
         */
        cursor = 0;