Open nikonikoniko opened 2 years ago
Also consider replacing pouchdb/couchdb replication with graphQL replication: https://rxdb.info/replication-graphql.html
I believe that this should work while avoiding pouchdb completely and choosing a different frontend storage. This is also worth looking into and researching.
this is also relevant to #20
They have fixed the error in https://github.com/pubkey/rxdb/pull/3886
When
pouchdb/memory
orpouchdb/idb
are configured as the rxdb storage, then we cannot insert, delete, reinsert, and re-delete. The second deletion causes a 409 error from pouch, because the revision numbers no longer work. The problem has been isolated in repository https://github.com/nikonikoniko/rxdb-pouchdb-failing-revision-example where this is the code to reproduce the problem: https://github.com/nikonikoniko/rxdb-pouchdb-failing-revision-example/blob/main/src/index.jsThe people at rxdb have been extremely responsive so far, and another user has created a pull request with the failing test for the same issue here: https://github.com/pubkey/rxdb/pull/3839
For now, we can move to a different storage backend when we need to re-add the entire document often.