GothenburgBitFactory / GothenburgBitFactory/taskchampion

Batched operations are not correctly updated on sync

Open
#686 5 comments 0 reactions 0 assignees View on GitHub
topic:sync type:bug
Dominant language
Rust
Stars
184
Forks
41
Avg merge
1d 1h
Merged PRs (30d)
7

Description

During a sync, we first download any new versions from the server, and "rebase" any local operations on top of those. The operational transform magic lets us do this rebasing deterministically and without conflicts.

When there are a lot of local changes, we "batch" them into ~1MB batches to improve performance. However, in downloading new versions we only rebase the _current_ batch; remaining local operations after this batch are implicitly moved on top of the operations from the server without any OT being applied.

I think the easiest way to adjust this is to get new versions from the server and rebase on top of them before batching, then upload batches until done or server.add_version tells us that there's a new version (such as from another replica syncing at the same time). When that occurs, we can go back and start over only with the operations we haven't sync'd yet.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.