couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Hall <>
Subject Re: Replication Filters: When changing restrictions data becomes out of sync
Date Mon, 05 Apr 2010 11:54:36 GMT
Hi Randall,

Thanks for the comment.  I looked at the _update test cases but
couldn't see anything which would fit.

How would I issue a DELETE command from javascript against the FirstDB?



On Mon, Apr 5, 2010 at 1:27 AM, Randall Leeds <> wrote:
> 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

View raw message