sync_exchange should transmit the txid it thinks the target was at

Bug #1006872 reported by John A Meinel
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
U1DB
Fix Released
High
Eric Casteleijn

Bug Description

related to bug #999574, I'm just splitting things out to be clearer about what pieces of this puzzle are getting solved.

Specifically, sync_exchange currently takes a last_known_generation. Which is the replica generation of the target replica, that was known by the source replica. We use this for the target to determine what documents need to be returned.

For safety/sanity checking, we should also pass the transaction_id that the source associates with the target. When the target gets this information, it should then validate the transaction id against its transaction log and abort if the transaction id doesn't match. The case where it doesn't match is when the *target* has diverged from the copy that the source last synced with.

Related branches

Revision history for this message
John A Meinel (jameinel) wrote :

marking this pre-release because it is a network visible change (requires passing new parameters) so we want the network api stable for internal release (I believe).

Changed in u1db:
milestone: full-release → pre-release
Revision history for this message
John A Meinel (jameinel) wrote :

Because of bug #1006882, I'm wondering if we need to do this, or whether that code handles it.

Revision history for this message
Eric Casteleijn (thisfred) wrote :

We could fail earlier if we do this check when initializing the sync, but I'm not sure it's worth the additional code, so I'm inclined to say the code closing bug #1006882 is good enough...

Changed in u1db:
status: Confirmed → Incomplete
Revision history for this message
Eric Casteleijn (thisfred) wrote :

I am creating a branch with a bunch of integration tests, if there is anything that is currently missed and would be caught by adding this, I will do so.

Changed in u1db:
status: Incomplete → In Progress
assignee: nobody → Eric Casteleijn (thisfred)
Revision history for this message
Eric Casteleijn (thisfred) wrote :

Yeah we do need this.

Changed in u1db:
status: In Progress → Fix Committed
Changed in u1db:
status: Fix Committed → In Progress
Changed in u1db:
status: In Progress → Fix Committed
Changed in u1db:
milestone: pre-release → 0.0.3
status: Fix Committed → Fix Released
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.