ebi-state: persistent database and service rework#15
Merged
Conversation
- implement `Storable` for `Shelf, Workspace` in `ebi-types` - wrap `ChaCha12Rng` into crate-owned `SeededChacha12Rng` in `ebi-filesystem` - move redb logic of `ebi-database` into own module
- redefine `StatefulRef` as `Inner<ArcSwap<T>, I>` implementing `Ref` trait - remove `RwLock` and inner state update execution in `stateful_rcu`, now return the to be executed state update `Future` instead
- rename `StateService` to `StateDatabase` - now service API can be scoped to workspace by calling `state_db.workspace(id).workspace_related_call(...)` - move `EditShelf`, `EditWorkspace`, `CreateTag` and `DeleteTag` workspace-related logic inside `StateDatabase`
- rename `ResponseMetada` to `Status` in `ebi-proto` - add new `MessageType` variant: `ResponseError` - return `Status` from `RpcService` instead of unit () error, making error handling cleaner
- create and update entries to persisent redb database according to `StateDatabase` service calls
- implement `full_load` for `StateDatabase`, which tries to load a stored database reconstructing references from `Storable` types - add test for db loading correctness `save_restore_db`
…estore_db` test - add `sync_state` handling commiting a staged state of the history for `StateDatabase` - `PartialEq` impls for info fields in `ebi-types` - expand `save_restore_db` test to check for post state-sync correctness
- tests for creating/deleting tags - tests for creating/deleting workspaces - tests for assigning/unassgning shelves
- rename `ebi-database` to `ebi-state` - rename `History` to `StateChain` - rename `GroupState` to `StateView` - rename `StateDatabase` to `State` - rename `ScopedDatabase` to `WorkspaceState` - change `synced` to `commited/received` in `StateChain` - rename `hist` to `confirmed` in `StateChain`
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 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.
Stateservice and full loading from a saved redb instance throughfull_loadebi-databasecrate rename intoebi-stateand related renamesStateChain: add committed and received operations CRDT stub, renamehisttosynced