Does CouchDB /_changes?since=X request give older feed before X?

28 views Asked by At

CouchDB Version (v 2.3.1).

Problem: As per mentioned approach below, sometimes we receive older feeds repeatedly before X sequence value and due to that, our solution to process new feed change only is not working efficiently.

We have a replication to copy the data from our one server(primary server) to another server(secondary server). The secondary server is also receiving the latest data from time to time from the primary server.

We are working on an algorithm mentioned below:

1. read /dbname/_changes?limit=L&include_docs=true from secondary server.
2. process each feed row
3. periodically (every X seconds or every X rows) store the "seq" value of the last row you processed

If it is ever crashed, we can do this same procedure again but modified in step 1;

revised 1. read /dbname/_changes?limit=L&include_docs=true&since=X

where X is the value we saved in step 3. Here, we are not using continuous mode so we store the "last_seq" value at the end of consuming the non-continuous response.

Few Questions:

  1. Did anyone face this kind of issue?
  2. If yes, then it could be chance to happen only in replicated server not on primary server?
  3. What could be the best approach to avoid older feeds if they are before X last sequence?
0

There are 0 answers