Offline devices recreate online-deleted documents when edited offline.
- Dominant language
- JavaScript
- Stars
- 17.6k
- Forks
- 1.5k
- PR merge metrics
- No merged PRs in 30d
Description
**Issue**
Offline devices recreate online-deleted documents when edited offline.
**Details**
**Environment**: Hybrid app
**Platform**: All
**Adapter**: Default
**Server**: CouchDB
**Versions:**
**Pouch db** : 8.0.1
**Couch db** : 3.3.3
**Steps to Reproduce**
Two devices are used: one online and one offline. Both have identical local databases (freshly synced).
The online device deletes document A.
The offline device edits the same document (A) and saves it while offline.
Once the offline device goes back online, document A is recreated, even though it was deleted on the online device.
Expected Behavior
The document A should not be recreated when the offline device syncs because it was deleted on the online device. The revision number should not reset.
**Question**
Shouldn't the replication process ignore a document with a revision number higher than 1 that has no history in the database? What might I be missing here?
Thanks for your help!
Contributor guide
Assessment
This issue has not been assessed yet.