This repository was archived by the owner on Sep 12, 2018. It is now read-only.
Closed
Conversation
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.
Contributor
|
I've updated the base PR for this (#563) with the split introduced here and a patch to:
|
Contributor
|
Work continues in #563 . |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
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?