-
Notifications
You must be signed in to change notification settings - Fork 33
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
[Persistence] Adds atomic Update for TreeStore #861
Merged
Merged
Changes from 1 commit
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
d8d8ddf
[chore] submodule pattern updates to TreeStore
dylanlott 1a5777c
updates TreeStore to use Submodule type
dylanlott f87518a
[fixup] embeds TreeStoreFactory on to TreeStoreModule
dylanlott 671598d
[fixup] TreeStoreOption and TreeStoreModule updates
dylanlott c988cbc
[fixup] get height provider from bus in tree tests
dylanlott 4ae3912
[Temp] s/TreeStore/treeStore (#920)
Olshansk a601002
[fixup] formatting long mock definitions
dylanlott 795ce87
[chore] submodule pattern updates to TreeStore
dylanlott 4df81fe
[feature] adds atomic rollbacks to TreeStore
dylanlott f77f764
linter updates
dylanlott 674d539
[fixup] pass testing.T to the newTestApp function
dylanlott 5ee3f42
treestore tests use testing.T instead of err returns
dylanlott 713017b
[fixup] privatizes treeStoreDir field
dylanlott 7f947f9
[fixup] fix path for treestore mock generations
dylanlott d70a067
[fixup] use method to fetch context instead
dylanlott d107ed0
[fixup] adds comments and updates tests
dylanlott 626ea5d
[fixup] adds optimize comment to save function
dylanlott b3ab6b0
[fixup] cleanup
dylanlott fc04ab0
[docs] updates package level comment
dylanlott 2af89dd
[fixup] adds comments and updates logger use
dylanlott 8ed31bf
09097ef
[rename] s/NewSavePoint/SetSavePoint/g
dylanlott 07b64da
[fixup] update test names and use constants in tests
dylanlott 1ecfde6
[fixup] adds better comment to treeStore#Rollback
dylanlott a687768
[tests] adds a test for failing rollback
dylanlott 800b2cb
[fixup] check rollback error value to satisfy linter
dylanlott 0b22519
[test] adds a test for block proposal revert
dylanlott ba85105
[fixup] fix linter error
dylanlott 7a7d95c
[fixup] updates rollback test to use Errors#Is
dylanlott 0f87f0b
[fixup] prevent import cycle error errors in treestore
dylanlott cb4497d
[fixup] reduce export footprint of worldState
dylanlott 6ce32dc
[docs] update rollback comment
dylanlott 7bad92e
[fixup] s/trees_hash1/treesHash1/
dylanlott 4d218dc
[fixup] adds a happy path test for CreateProposalBlock
dylanlott File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
[fixup] use method to fetch context instead
- Loading branch information
commit d70a067e6962e36dad4eb67b64ca0ef63c66910f
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we pass in ctx and get back an err to append?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, probably when we thread context through the module.
It was an intentional design choice to make
AtomicStore#Rollback
return nothing, so I would argue no, it shouldn't. It was an attempt by me at defining errors out of existence by masking.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After messing with it and testing it locally, the key might actually be to make the
AtomicStore
interface return an error for easier testing, but mask the error from thepersistenceRWContext
layer up instead, allowing it the power to handle and possibly recover from rollback errors. Thinking about this more 👍There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bump on this one.