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

Track and use last known remote hash in pullv2 #5571

Draft
wants to merge 2 commits into
base: trunk
Choose a base branch
from

Conversation

ChrisPenner
Copy link
Contributor

@ChrisPenner ChrisPenner commented Feb 5, 2025

Overview

TODO: Need to ensure migration happens in create-schema

If we keep track of the last known hash of a remote branch according to the last time we synced with it, we can provide that hash to the server when running syncv2 and it knows which entities we'll need to receive by diffing the two.

Implementation notes

  • Adds a migration to add the last_known_causal_hash to the remote branch table
  • Sets the last known remote causal after each sync.
  • Load and use this to skip causal-negotiation when running a V2 pull, if it's available (otherwise use causal negotiation).

Test coverage

  • Need to test this more thoroughly

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