From: Jong Hyuk Choi Date: Tue, 22 Jun 2004 18:15:29 +0000 (+0000) Subject: limit checking in syncrepl X-Git-Tag: OPENDLAP_REL_ENG_2_2_MP~194 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=3917d2b15dad2220e1263af60c742bf93884c986;p=openldap limit checking in syncrepl --- diff --git a/servers/slapd/config.c b/servers/slapd/config.c index e0c49c7c07..cd7c13f380 100644 --- a/servers/slapd/config.c +++ b/servers/slapd/config.c @@ -3116,8 +3116,8 @@ add_syncrepl( si->si_syncCookie.octet_str = NULL; si->si_syncCookie.sid = -1; si->si_manageDSAit = 0; - si->si_tlimit = -1; - si->si_slimit = -1; + si->si_tlimit = 0; + si->si_slimit = 0; si->si_syncUUID_ndn.bv_val = NULL; si->si_syncUUID_ndn.bv_len = 0; diff --git a/servers/slapd/syncrepl.c b/servers/slapd/syncrepl.c index bcc4b4f346..4f7a3650e9 100644 --- a/servers/slapd/syncrepl.c +++ b/servers/slapd/syncrepl.c @@ -1141,8 +1141,9 @@ syncrepl_entry( op->o_req_dn = si->si_base; op->o_req_ndn = si->si_base; - op->ors_tlimit = 0; - op->ors_slimit = 0; + op->o_time = slap_get_time(); + op->ors_tlimit = SLAP_NO_LIMIT; + op->ors_slimit = 1; /* set callback function */ op->o_callback = &cb; @@ -1373,8 +1374,9 @@ syncrepl_del_nonpresent( op->o_tag = LDAP_REQ_SEARCH; op->ors_scope = si->si_scope; op->ors_deref = LDAP_DEREF_NEVER; - op->ors_slimit = 0; - op->ors_tlimit = 0; + op->o_time = slap_get_time(); + op->ors_tlimit = SLAP_NO_LIMIT; + op->ors_slimit = SLAP_NO_LIMIT; op->ors_attrsonly = 0; op->ors_attrs = NULL; op->ors_filter = str2filter_x( op, si->si_filterstr.bv_val ); @@ -1871,14 +1873,24 @@ dn_callback( if ( si->si_syncUUID_ndn.bv_val != NULL ) { #ifdef NEW_LOGGING LDAP_LOG( OPERATION, ERR, - "dn_callback : multiple entries match dn\n", 0, 0, 0 ); + "dn_callback : consistency error - entryUUID is not unique\n", 0, 0, 0 ); #else Debug( LDAP_DEBUG_ANY, - "dn_callback : multiple entries match dn\n", 0, 0, 0 ); + "dn_callback : consistency error - entryUUID is not unique\n", 0, 0, 0 ); #endif } else { ber_dupbv_x( &si->si_syncUUID_ndn, &rs->sr_entry->e_nname, op->o_tmpmemctx ); } + } else if ( rs->sr_type == REP_RESULT ) { + if ( rs->sr_err == LDAP_SIZELIMIT_EXCEEDED ) { +#ifdef NEW_LOGGING + LDAP_LOG( OPERATION, ERR, + "dn_callback : consistency error - entryUUID is not unique\n", 0, 0, 0 ); +#else + Debug( LDAP_DEBUG_ANY, + "dn_callback : consistency error - entryUUID is not unique\n", 0, 0, 0 ); +#endif + } } return LDAP_SUCCESS;