Apache CouchDB's data model stores a "revision tree". This tree branches on two events:
- the same revision is updated on two nodes and then those node's replicate, creating a conflict.
- a document is deleted by writing a new revision with _deleted, then the document is created again which creates a new tree begining with a revision starting in 1-.
Because CouchDB also implements a default "most writes wins" policy as a default winner during conflicts and replication this means that during replication the client must read the entire rev tree up to the point that the last matching revision exists.
In practice, very few CouchDB applications actually resolve conflicts using the revision. Instead, the vast majority of applications just stick with the "most writes wins" policy which works well enough for most workloads.
So, for couchup, I've decided to rely on the "most writes wins" policy and not write or hold on to the entire revision tree. Since I'm not storing the entire rev tree I do need an alternative