-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds transaction logging to state to ensure we only remove the items
functions write Beforehand we had trouble with state manipulation. If we wanted to do a default write for a single-step action, it would not have any way to know what that wrote, versus what was in the state. This adds a simple state log that has a single "flush" operation -- it just keeps track of all operations since the last "flush" call, and returns those. This way, all we have to do is flush before the operation, flush after, and use the "after" results to filter writes so we know which default to apply. This also cleans up a bit of the immutability guarentees -- we were doing a deepcopy on every state update, which has the potential to slow applications down.
- Loading branch information
1 parent
7a3e145
commit ba5b4bd
Showing
4 changed files
with
207 additions
and
22 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
Oops, something went wrong.