From: Howard Chu Date: Wed, 22 Oct 2003 07:53:28 +0000 (+0000) Subject: Shortcut syncrepl candidate selection if CSN is up to date X-Git-Tag: OPENLDAP_REL_ENG_2_1_MP~518 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=95a58669650669175bbb67c90a754fdf33621741;p=openldap Shortcut syncrepl candidate selection if CSN is up to date --- diff --git a/servers/slapd/back-bdb/search.c b/servers/slapd/back-bdb/search.c index 39785dd96b..122a6f3dec 100644 --- a/servers/slapd/back-bdb/search.c +++ b/servers/slapd/back-bdb/search.c @@ -668,6 +668,13 @@ dn2entry_retry: goto done; } + if ( sop->o_sync_state.bv_val && ber_bvcmp( &sop->o_sync_state, + search_context_csn ) == 0 ) + { + bdb_cache_entry_db_unlock( bdb->bi_dbenv, &ctxcsn_lock ); + goto nochange; + } + /* select candidates */ if ( sop->oq_search.rs_scope == LDAP_SCOPE_BASE ) { rs->sr_err = base_candidate( op->o_bd, &base, candidates ); @@ -1245,6 +1252,7 @@ loop_continue: ldap_pvt_thread_yield(); } +nochange: if (!IS_PSEARCH) { if ( sop->o_sync_mode & SLAP_SYNC_REFRESH ) { rs->sr_err = LDAP_SUCCESS;