Skip to content
This repository was archived by the owner on Sep 12, 2018. It is now read-only.

Fast-forward syncing, rebased.#736

Closed
ncalexan wants to merge 7 commits intomozilla:masterfrom
ncalexan:grisha/sync-downloader
Closed

Fast-forward syncing, rebased.#736
ncalexan wants to merge 7 commits intomozilla:masterfrom
ncalexan:grisha/sync-downloader

Conversation

@ncalexan
Copy link
Copy Markdown
Member

@ncalexan ncalexan commented Jun 6, 2018

Here's a sliced-and-diced version of #563, with the simple stuff pulled forward.

I'll dig into the larger restructure for atomic metadata updates now, but perhaps you could stamp the easy bits @grigoryk?

ncalexan and others added 7 commits June 6, 2018 14:56
It's technically very challenging to consider syncing Mentat stores
with different bootstrap transactions.  Therefore, Tolstoy blindly
skips the first (bootstrap) transaction.  In the future, we can at
least recognize that the underlying Mentat stores are incompatible and
bail out early.
This was a work-around for Tolstoy, which couldn't gracefully handle
syncing a store with a bootstrap transaction.  Tolstoy now handles
that single transaction, so this is no longer necessary.
This is part of a larger shift towards atomically updating `Conn`.
The division of labour is (and must be) similar to `db` and `Conn` in
a `transact`: `transact` coordinates `db` to do low-level work and
processes progress reports, and then commits the SQL transaction and
atomically advances `Conn`'s metadata.  In a parallel fashion, `sync`
will coordinate `tolstoy` to do low-level work before committing the
SQL transaction and atomically advancing `Conn`'s metadata.
This handles the situation where only one of the local client and the
remote server have advanced.
@grigoryk
Copy link
Copy Markdown
Contributor

grigoryk commented Jun 8, 2018

I've updated the base PR for this (#563) with the split introduced here and a patch to:

  • correctly skip over datoms while skipping a transaction
  • skip over the second transaction, assumed to be user schema definition (since we can't merge yet)

@grigoryk
Copy link
Copy Markdown
Contributor

Work continues in #563 .

@grigoryk grigoryk closed this Jun 26, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants