pouchdb: Filtered live replication - Many 404 errors
I’m doing a live filtered replication, like this:
const sync$ = pouchStore.sync(remoteDB, {
live: true,
retry: true,
filter: 'userView/by_userId',
query_params: {userId: '1234'}
});
I’m seeing many 404 errors appearing in my log, occurring according to the default back-off times.
GET http://gateway:5984/data/_local/WrCyesQFsZ6HR3n2FoCEAA%3D%3D? 404 (Object Not Found)
The data does, however, sync correctly to the browser, albeit with the 404s appearing continually. I’m thinking that maybe the errors are related to the ‘push’ side of the sync.
If I remove the retry option, the 404 appears once and the sync is immediately aborted with this error:
If I run without the filter, I just get the usual 404s with the reassuring ‘this is normal…’ log message and sync works correctly.
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 3
- Comments: 24 (8 by maintainers)
Yes, that’s about as much as I’d figured. I’m using Pouch 6.1.1 and Couch 2.0.0.
It’s the filter that is causing the issue somewhere in Pouchdb on the push side of the sync. If I break the sync into 2 replications and leave the filter off the push side, it works.
I think it’s a bug. There are no PUTs to create the push checkpoint when there’s a filter in the options.
I managed to workaround having multiple per user db on pouch side syncing everything to one Couchdb.
Thank you all and @willholley for the help.