Repository navigation
Fix native sync reconciliation latency - #156
Merged
Merged
Conversation
Query only outstanding local UUIDs in the confirmed graph and skip empty reconciliation and pending pumps. Use indexed local sync statuses so settled captures cannot cause graph-sized work on the shared core executor.
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
Filter indexed sync-status metadata before reading eligible blocks, retaining confirmation for arbitrary non-synced statuses without materializing settled records. Extend the reconciliation contract to cover retrying states.
There was a problem hiding this comment.
Devin Review found 1 finding. Devin automatically fixed it.
Fixed by Devin (1)
- Other unsynced statuses skip confirmation — Preserved the original open-ended sync_status <> synced contract by filtering attribute-indexed status metadata before materializing matching blocks. The existing reconciliation test now covers retrying; red/green, all 1,296 core tests, and real three-client crash/reconnect/lost-ACK stress validation passed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Remove full-block materialization from synchronization reconciliation on the serial core executor shared by sync and native node interactions.
synced, including nonstandard retry states. Use hashed UUID matching rather than repeated list searches.Validation
opam exec --switch=5.5.0 -- dune build @shared/native/runtest: 1,296 passed on the final implementation, including encrypted sync, rejection/retry, persistence, ACK and rebase coverage. The nonstandard-status regression failed against the whitelist implementation and passed after the fix.LogseqModelbuild passed. Noswift testused.20261109/20261110/20261111/20261112/20261113, with320/500/320/160/320generated steps. Covered offline concurrent edits, process crashes, lost WebSocket ACKs, server restart and asset byte verification. Each run ended with identical UUID-normalized synced datoms across mobile, CLI and a fresh server snapshot, zero pending work and no residual sync error.Physical iPad latency and Instruments profiling are not yet verified; timings above are not device measurements. This PR shortens reconciliation but does not allow local operations to preempt an already-running sync task. Separating local interaction execution from synchronization preparation is a separate follow-up.
Link to Devin session: https://app.devin.ai/sessions/951fc198b3c140ad8b8cc8af5b531471
Open in Devin Desktop: https://app.devin.ai/desktop/session/951fc198b3c140ad8b8cc8af5b531471?variant=devin
Requested by: @tiensonqin
🟢 Devin fixed the finding · Follow Devin's work