From user-return-9740-apmail-couchdb-user-archive=couchdb.apache.org@couchdb.apache.org Mon Apr 05 00:28:07 2010 Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 74376 invoked from network); 5 Apr 2010 00:28:07 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 5 Apr 2010 00:28:07 -0000 Received: (qmail 34313 invoked by uid 500); 5 Apr 2010 00:28:06 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 34272 invoked by uid 500); 5 Apr 2010 00:28:06 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 34264 invoked by uid 99); 5 Apr 2010 00:28:05 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Apr 2010 00:28:05 +0000 X-ASF-Spam-Status: No, hits=3.3 required=10.0 tests=AWL,FREEMAIL_FROM,FS_REPLICA,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of randall.leeds@gmail.com designates 209.85.223.191 as permitted sender) Received: from [209.85.223.191] (HELO mail-iw0-f191.google.com) (209.85.223.191) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Apr 2010 00:28:01 +0000 Received: by iwn29 with SMTP id 29so491928iwn.17 for ; Sun, 04 Apr 2010 17:27:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:received:message-id:subject:from:to:content-type; bh=g4JJFRVRr4FgSMnmzw5zFTGhn7wdgiu32T1vTtOFHIs=; b=O3lRxzfRpdFmsI/VZPFgEqAuAHiqF9SIPAksCU/vCKk3/EfI5sHXhwbj5cB0BzcWjP WFTt/iX1sVgF3uXj4QgijlDFkYo5Jh5IXLJro9C/JCcSQ+lzgEKrcRLGa6pJrJXi+97k jdeU7uuqMdcSZ/gppadILy0kohkn4TnqeACVY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=X0nvWBI/4n3hnxQRX6xKWF6KsyQhDR/Jm7PJ7pk1KZV2f+ezxIRwMha949EESEggnk wZv81aSfEsVgQjgEcJWpnhXPvOGS45VJPpYSTDdFfHx2Y1ttdzm+dSRSpLtqrwj8CK+H v78PD0IrB0S21JDzi6TvL/3OL37R17FlSK8Pc= MIME-Version: 1.0 Received: by 10.231.157.11 with HTTP; Sun, 4 Apr 2010 17:27:40 -0700 (PDT) Received: by 10.231.157.11 with HTTP; Sun, 4 Apr 2010 17:27:40 -0700 (PDT) In-Reply-To: References: Date: Mon, 5 Apr 2010 01:27:40 +0100 Received: by 10.231.153.149 with SMTP id k21mr2383068ibw.17.1270427260576; Sun, 04 Apr 2010 17:27:40 -0700 (PDT) Message-ID: Subject: Re: Replication Filters: When changing restrictions data becomes out of sync From: Randall Leeds To: user@couchdb.apache.org Content-Type: multipart/alternative; boundary=001636c9268d946530048372658e --001636c9268d946530048372658e Content-Type: text/plain; charset=UTF-8 If you're looking for replication to delete documents that don't fit the filter from the target, you'll have to do that manually. It is never the place of replication to remove documents on the target. What you can do is set up an update handler on second db that deletes documents exclusivly meant for seconddb from firstdb so in this way you can make it automatic. This doesn't cover the case where a document that used to replicate should be deleted everywhere except maindb. On Apr 4, 2010 3:58 PM, "Ben Hall" wrote: Hi, I have the following setup: MainDB FirstDB SecondDB First and Second will contain a subset of the data in MainDB. I planned to use Replication Filters to populate the DB. This is working great, until I change a document in MainDB from being restricted to FirstDB to being restricted to SecondDB. When this happens, replication correctly applies it to SecondDB - however it still exists in FirstDB. As such, my data is now inconsistent. Is this correct? The only thing I can think is that I'm going to have to manually delete the document from FirstDB - which is a little bit annoying. Is there a better way? Thanks Ben http://twitter.com/Ben_Hall --001636c9268d946530048372658e--