Skip to content
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

Repeated longpoll _changes requests with 'since=now' option is unreliable (solution included) #5409

Open
ErikVerheul opened this issue Jan 20, 2025 · 0 comments

Comments

@ErikVerheul
Copy link

ErikVerheul commented Jan 20, 2025

Description

I am syncing multiple clients with doc changes from a central couchdb document store.

When using the changes /{db}/_changes API to listen for updates and modifications to the database for synchronization of the clients, updates are missing while the seq counter is still counting correctly.

Steps to Reproduce

The sync is started with a GET and url; ${currenDb}/_changes?filter=filters/sync_filter&feed=longpoll&include_docs=true&since=now
Then call again after a result or a timeout.

The problem: When another client updates multiple documents most often several changes are missing. But a the next successful sync the seq counter starts with the correct value. It counted the missing updates.
(Leaving out the sync_filter makes no difference)

HOWEVER: When the data.last_seq is saved after the first call and used in the url as: ... &since=last_seq in the next call, and from now on, always the last_seq value is used, the synchronization works fine.

Expected Behaviour

The synchronization should work with repeated since=now calls OR the documentation should state otherwise.

Your Environment

This behaviour is tested on Ubuntu 24.04 and Couchdb version 3.3.3. and 3.4.2

Additional Context

Expect a bug fix or a documentation update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant