api for validating transaction_id of target_replica

Bug #1006889 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

split out of bug #999574

Related to bug #​1006879, but sort of the 'inverse'. The first bug is about when we get a new document from a given replica, before we update the known generation of that replica, we want to validate the generation and transaction id.

This case is when the stream starts (pending bug #1006882), we want to validate that the generation the source knows about us matches the transaction_id that we recorded for that generation.

Technically, we can do this sanity checking after pre-release, because it doesn't change the network api (other than causing an abort because we checked the transaction).

This would be a 'private' api like put_doc_if_newer, but we may want to make it available (more direct) for easier unit testing, rather than testing it as a side-effect of sync_exchange.

Note that bug #1006882 currently includes validating the transaction information, however we can split "must accept the parameter" out from "validate the parameter". As the former doesn't require this api.

Related branches

Changed in u1db:
assignee: nobody → Eric Casteleijn (thisfred)
status: Confirmed → In Progress
Changed in u1db:
status: In Progress → Fix Committed
Changed in u1db:
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.