couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrea Brancatelli <abrancate...@schema31.it>
Subject Dynamic Filtered Replication
Date Tue, 28 Aug 2018 12:51:36 GMT
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









Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message