sync_exchange should transmit the txid it thinks the target was at
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_
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
- Samuele Pedroni: Approve
-
Diff: 899 lines (+226/-130)18 files modified.bzrignore (+6/-0)
include/u1db/u1db_internal.h (+2/-2)
src/u1db.c (+1/-1)
src/u1db_http_sync_target.c (+8/-5)
src/u1db_sync_target.c (+23/-27)
u1db/__init__.py (+5/-2)
u1db/backends/inmemory.py (+4/-0)
u1db/errors.py (+4/-0)
u1db/remote/http_app.py (+15/-6)
u1db/remote/http_errors.py (+2/-0)
u1db/remote/http_target.py (+5/-2)
u1db/sync.py (+13/-7)
u1db/tests/c_backend_wrapper.pyx (+25/-17)
u1db/tests/test_backends.py (+1/-1)
u1db/tests/test_c_backend.py (+1/-1)
u1db/tests/test_http_app.py (+2/-1)
u1db/tests/test_remote_sync_target.py (+16/-16)
u1db/tests/test_sync.py (+93/-42)
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 |
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).