get_sync_info should possibly return target txid
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
U1DB |
Won't Fix
|
Low
|
Unassigned |
Bug Description
Right now, get_sync_info returns
(target_
This is enough information for us to figure out if the remote target has new data that we want to synchronize with, and if they need anything from us.
It also lets us potentially detect if we have rolled back/been copied. Eg. if the local last_known_
However, we don't have an immediate check on the target diverging. If we returned the target_
Note that rollback is intentionally not an error today, though we may rethink that. But if someone gets a rollback, they should be able to resync as the first action, and be ok. Alternatively, we just always make it a failure and require a fullsync after a rollback.
Note also that this just allows us to stop early. sync_exchange itself should be sending the "this is the revision we think you are at" and the server should abort if the transaction id doesn't match. It can do better detection anyway (because it probably has the history of transaction ids, rather than just the tip).
We can mark this WontFix if we feel it isn't worth the extra logic at this level.