]> git.sur5r.net Git - openldap/commitdiff
limit checking in syncrepl
authorJong Hyuk Choi <jongchoi@openldap.org>
Tue, 22 Jun 2004 18:15:29 +0000 (18:15 +0000)
committerJong Hyuk Choi <jongchoi@openldap.org>
Tue, 22 Jun 2004 18:15:29 +0000 (18:15 +0000)
servers/slapd/config.c
servers/slapd/syncrepl.c

index e0c49c7c070b119b46e0d727842d31c070851ff3..cd7c13f380e92fd78893cd6ab8528821001948f5 100644 (file)
@@ -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;
 
index bcc4b4f346af65bf56d5543c51a208f378c22979..4f7a3650e98cb8770cb36a7d01206120c919aeb4 100644 (file)
@@ -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;