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

Reinserting deleted documents results in Error 409 #26

Open
nikonikoniko opened this issue Jun 13, 2022 · 2 comments
Open

Reinserting deleted documents results in Error 409 #26

nikonikoniko opened this issue Jun 13, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@nikonikoniko
Copy link
Contributor

When pouchdb/memory or pouchdb/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.js

The 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: pubkey/rxdb#3839

For now, we can move to a different storage backend when we need to re-add the entire document often.

@nikonikoniko nikonikoniko added the bug Something isn't working label Jun 13, 2022
nikonikoniko pushed a commit that referenced this issue Jun 13, 2022
@nikonikoniko
Copy link
Contributor Author

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

@nikonikoniko
Copy link
Contributor Author

They have fixed the error in pubkey/rxdb#3886

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant