Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor revision IDs into RevId struct and u64 tokens
The RevId struct is a delta-compressible representation used by Engine, the RevToken is an alias for u64 that is used by plugins as a non-colliding identifier for a revision to base their edits on. The RevToken is currently just a DefaultHasher hashed version of RevId, which since DefaultHasher is cryptographically-pseudorandom should never really collide. The collision set is just concurrent revisions since it searches for the corresponding revision from newest to oldest. This refactor paves the way for different Fuchsia devices to have separate device IDs on their Engine, allowing them to generate non-conflicting revisions that can be merged using the Ledger syncing mechanics.
- Loading branch information
Showing
5 changed files
with
138 additions
and
83 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.