From d53c90dc290707d09282c637d70716479721da63 Mon Sep 17 00:00:00 2001 From: Jong Hyuk Choi Date: Mon, 25 Aug 2003 17:10:18 +0000 Subject: [PATCH] Context CSN patch (1) - cleanup - serialize search_candidates() with the read of search_context_csn --- servers/slapd/back-bdb/search.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/servers/slapd/back-bdb/search.c b/servers/slapd/back-bdb/search.c index 80020c29a0..9f8e1228a7 100644 --- a/servers/slapd/back-bdb/search.c +++ b/servers/slapd/back-bdb/search.c @@ -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; -- 2.39.5