Replication of deleted document

28 views
Skip to first unread message

wbi...@attic.nl

unread,
May 20, 2014, 3:26:27 AM5/20/14
to mobile-c...@googlegroups.com
What happens in this scenario:
1. Two peers (iPads) A and B are configured for continuous push to eachother. 
2. They are in sync and have the same version of document X.
3. Peer A goes offline.
4. Peer B deletes document X (not purged)
5. After an hour A comes back online.

Is the deleted document now pushed from B to A ?
This implies that deleted documents (at least their metadata) are stored 'forever', correct ?

Thanks,
Willem

Bart Arribe

unread,
May 20, 2014, 9:10:45 AM5/20/14
to mobile-c...@googlegroups.com
The document should be pushed to A, Basically, when you delete a document, it creates a new revision of this document with the attribute _deleted = true.

Bart

Jens Alfke

unread,
May 22, 2014, 12:34:25 PM5/22/14
to mobile-c...@googlegroups.com
On May 20, 2014, at 12:26 AM, wbi...@attic.nl wrote:

Is the deleted document now pushed from B to A ?

Yes. A deletion is really just a special revision where the body includes the property “_deleted”:true (and usually nothing else.)

This implies that deleted documents (at least their metadata) are stored 'forever', correct ?

Yes. The previous revision’s body will be deleted the next time the database is compacted, but the revision tree metadata remains.

If you want to get rid of all traces of a document locally, you’ll need to purge it.

—Jens
Reply all
Reply to author
Forward
0 new messages