-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Simplify StateManagerDisk implementation * Act more like the memory state manager and only track the root state in self.states * .load_state always loads a single state or returns None * .populate_states is the new entry point in loading from disk and it only occurs when the root state is not known * much fast * StateManagerDisk now acts much more like StateManagerMemory Treat StateManagerDisk like StateManagerMemory for AppHarness * Handle root_state deserialized from disk In this case, we need to initialize the whole state tree, so any non-persistent states will still get default values, whereas on-disk states will overwrite the defaults. * Cache root_state under client_token for StateManagerMemory compatibility Mainly this just makes it easier for us to write tests that work against either Disk or Memory state managers.
- Loading branch information
Showing
3 changed files
with
36 additions
and
45 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