Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SyncV2 Depth tracking #41

Draft
wants to merge 11 commits into
base: main
Choose a base branch
from
Draft

SyncV2 Depth tracking #41

wants to merge 11 commits into from

Conversation

ChrisPenner
Copy link
Contributor

@ChrisPenner ChrisPenner commented Feb 26, 2025

  • Create Depth Tables on Prod
  • Create and initialize migration tables on Prod.
  • Sanity Check Prod after migration

Overview

Iteratively track dependency-depth information for all entities such that we can stream entities to UCM clients in dependency-first order which allows them to save entities as soon as they're received rather than needing to do a client-side sort.

This also reduces required memory usage on the client, and makes the download more robust against Ctrl-c, since you can pick up from where you left off (the stream will skip any pre-saved entities).

Implementation notes

When an entity is saved, set its depth to max(depth of all dependencies) + 1.
When streaming entities to client, sort by depth ASC.
Set sort mode of stream to Dependencies First.

Test coverage

  • Test on staging

Loose ends

There's a corresponding improvement in UCM to better parallelize the download stream here: unisonweb/unison#5593

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant