]> git.sur5r.net Git - openldap/commitdiff
ITS#7052 syncrepl deletes need a non-empty CSN
authorHoward Chu <hyc@openldap.org>
Fri, 30 Sep 2011 07:09:01 +0000 (00:09 -0700)
committerQuanah Gibson-Mount <quanah@openldap.org>
Wed, 2 Nov 2011 23:14:47 +0000 (16:14 -0700)
Must not let the underlying DB generate its own.

servers/slapd/syncrepl.c

index 0c4bb5b9787cb3b075e79e6d5dace216cc25810a..af10aee04398fc689e693f0cc66dc6d473d27692 100644 (file)
@@ -2817,9 +2817,7 @@ syncrepl_entry(
                                /* FIXME: op->o_csn is assumed to be
                                 * on the thread's slab; this needs
                                 * to be cleared ASAP.
-                                * What happens if already present?
                                 */
-                               assert( BER_BVISNULL( &op->o_csn ) );
                                op->o_csn = a->a_vals[0];
                                freecsn = 0;
                        }
@@ -3160,6 +3158,9 @@ retry_modrdn:;
                        op->o_req_ndn = dni.ndn;
                        op->o_tag = LDAP_REQ_DELETE;
                        op->o_bd = si->si_wbe;
+                       if ( !syncCSN ) {
+                               slap_queue_csn( op, si->si_syncCookie.ctxcsn );
+                       }
                        rc = op->o_bd->be_delete( op, &rs_delete );
                        Debug( LDAP_DEBUG_SYNC,
                                        "syncrepl_entry: %s be_delete %s (%d)\n",