When InvalidGeneration is raised proceed with sync anyway

Bug #1019333 reported by Eric Casteleijn
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
U1DB
Won't Fix
High
Eric Casteleijn

Bug Description

When an invalidgeneration exception is raised during sync, there is a possibility that the source has reverted to an earlier generation but has not diverged since that. In this case we want to proceed with the sync. Since _put_doc_if_newer will raise an exception when it receives a change that *is* a divergence from what it knows about the source, we should just go ahead and sync until we either succeed, or hit divergence. Since we don't know if there is divergence, much less at which generation it happened, I think we need to do a full sync in this case.

See:

https://code.launchpad.net/~thisfred/u1db/sync_integration_tests/+merge/111278/comments/239583

Changed in u1db:
importance: Undecided → High
status: New → Confirmed
assignee: nobody → Eric Casteleijn (thisfred)
Changed in u1db:
status: Confirmed → Fix Committed
Changed in u1db:
status: Fix Committed → Confirmed
Revision history for this message
Eric Casteleijn (thisfred) wrote :

We will want a mechanism to recover from invalid generation/invalid transaction id errors, but it doesn't seem like guessing what generation to start at is going to be feasible.

Changed in u1db:
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.