-
Notifications
You must be signed in to change notification settings - Fork 0
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
Snapshotting Storage #97
Merged
Merged
Conversation
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
64a772f
to
a1088a4
Compare
This serves as the basis for what a real order would expect the format to be. Making this an explicit type makes it easy to refactor the intenral representation without having to go and change every instance of it
a1088a4
to
0e5ca7d
Compare
We remove all known warnings, this makes it nice as `mix test` and other commands will not spit any wanrings anymore
This ensures that the db is initialized before we run any tests. This matters in a lot of topics that require the DB to be online
This module consists of two parts: 1. An ordering map which tells of the latest order in the qualification map 2. A qualification map which maps from a qualified key to the stored value Further we provide types for everything so the code can be somewhat grocked by looking at the types
We test: 1. reads 2. blocking_reads 3. puts 4. blocking_reads with data not in yet
The intended strategy is to hold a current order and cache of ids to orders, to better get timestamps of the keyspace This is highly inefficient but is the best we can do without partitioning the key_space explicitly somehow
As we can see by running: mix test --cover we end up testing most of the module, with just a few basic calls, the ordering system is quite simple, and one can just take a number to figure out where they are next in line Percentage | Module -----------|-------------------------- 60.00% | Anoma.Node.Storage 92.86% | Anoma.Node.Storage.Communicator 96.43% | Anoma.Node.Storage.Ordering
With this, we have a very slow way of effectively slowly snapshotting the database. Very slow, someone should do a better method than what I'm doing here
0e5ca7d
to
2e1272a
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Create snapshot functionality
With this, we have a very slow way of effectively slowly snapshotting the database.
Very slow, someone should do a better method than what I'm doing here