Hi Andrea,

When replicating the content (source code) of the filter becomes part of
the replication identity. If the filter changes the replication would get a
new replication ID and it would effectively become a new replication and
reprocesses all the changes.

Cheers,
-Nick


On Tue, Aug 28, 2018 at 8:51 AM Andrea Brancatelli <[email protected]>
wrote:

> Hello everybody.
>
> I have a pretty academic question about CouchDB replication…
>
> I’m working on creating a setup to test my idea but I thought asking could
> save me some headaches.
>
> This is the scenario.
>
> Let’s suppose I have two database: Master and Slave with a Filtered
> Replication that uses some information stored in the _user database to
> determine wether to replicate the document or not …
>
> Now we put 100 docs in the Master DB, so Master Update SEQ reaches, let’s
> say, 100.
>
> The filter has filtered the replicated documents and on the Slave DB we
> have, let’s say 40 documents.
>
> The condition in the _user database changes and the new condition would
> mach 60 documents of the Master.
>
> Is there an “easy” way to refresh the sincronization between the two
> database and have the 20 missing docs synced?
>
> Maybe resetting the replication would automagically fix this (like the
> replication skipping the docs that are already in the Slave db?)
>
> How would you handle such a situation? Especially when the amount of docs
> is not 100... :-)
>
> I hope my question is clear enough.
>
> Thanks a lot.
>
> -------
> Andrea Brancatelli
>
>
>
>
>
>
>
>
>

Reply via email to