New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Filtered replication doesn't record progress unless change is returned #5145
Comments
garethbowen
added a commit
to garethbowen/pouchdb
that referenced
this issue
May 10, 2016
garethbowen
added a commit
to garethbowen/pouchdb
that referenced
this issue
May 10, 2016
garethbowen
added a commit
to garethbowen/pouchdb
that referenced
this issue
May 12, 2016
daleharvey
pushed a commit
that referenced
this issue
May 13, 2016
fixed by f1989ce |
willholley
added a commit
that referenced
this issue
Jun 3, 2016
An attempt to provide a better fix for #5145. It seems like it's safe to eagerly write a checkpoint in the event there are no changes returned (e.g. because a filter did not generate results). This at least allows the tests to pass - possibly this means we need more tests.
willholley
added a commit
that referenced
this issue
Jun 3, 2016
An attempt to provide a better fix for #5145. It seems like it's safe to eagerly write a checkpoint in the event there are no changes returned (e.g. because a filter did not generate results). This at least allows the tests to pass - possibly this means we need more tests.
willholley
added a commit
that referenced
this issue
Jun 3, 2016
An attempt to provide a better fix for #5145. It seems like it's safe to eagerly write a checkpoint in the event there are no changes returned (e.g. because a filter did not generate results). This also removes some assertions around last_seq / since values in the tests, since they don't hold in CouchDB 2.x / Cloudant. This at least allows the tests to pass - possibly this means we need more tests to cover situations where a small number of docs are returned.
willholley
added a commit
that referenced
this issue
Jun 3, 2016
An attempt to provide a better fix for #5145. It seems like it's safe to eagerly write a checkpoint in the event there are no changes returned (e.g. because a filter did not generate results). This also removes some assertions around last_seq / since values in the tests, since they don't hold in CouchDB 2.x / Cloudant. This at least allows the tests to pass - possibly this means we need more tests to cover situations where a small number of docs are returned.
daleharvey
pushed a commit
that referenced
this issue
Jun 3, 2016
An attempt to provide a better fix for #5145. It seems like it's safe to eagerly write a checkpoint in the event there are no changes returned (e.g. because a filter did not generate results). This also removes some assertions around last_seq / since values in the tests, since they don't hold in CouchDB 2.x / Cloudant. This at least allows the tests to pass - possibly this means we need more tests to cover situations where a small number of docs are returned.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I use filtered replication to reduce the number of records replicated to Pouch. When a change passes the filter function the doc is replicated to Pouch and the local seq is updated which future replications use as the
since
parameter so already filtered changes can be skipped over.However when no changes are returned the seq is not updated so subsequent replications use the old value for
since
. This means each doc can be run through the filter function multiple times until a change is made that passes the filter.For example if the couchdb seq is 2000 and the local seq is 1000 the replication request will look something like...
Then the server runs all the changes from 1000 to 2000 through the filter and responds with...
pouchdb then ignores the response as there are no
results
to update.Modify pouchdb to store the
last_seq
from the changes response in the replication checkpoint so replication starts from the new seq next time.The text was updated successfully, but these errors were encountered: