Skip to content

Commit

Permalink
Merge pull request #641 from donhui/patch-2
Browse files Browse the repository at this point in the history
Update doc/persistence.md
  • Loading branch information
dwnusbaum committed Dec 14, 2022
2 parents 4bd9b8c + fb7fd7f commit 0383c6f
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions doc/persistence.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ Running pipelines persist in 3 pieces:
- If null, probably the build dates back to before this field was added - we check to see if this is running in a highly persistent DurabilityMode (Max_survivability generally)
* done - if true, this execution completed, if false or un-set, the pipeline is a candidate to resume unless its only head is a FlowEndNode
- The handling of false is for legacy reasons, since it was only recently made persistent.
*
* various other boolean flags & settings for the execution (durability setting, user that started the build, is it sandboxed, etc)
3. The Program -- this is the current execution state of the Pipeline
* This holds the Groovy state - the `CpsThreadGroup` - with runtime calls transformed by CPS so they can persist
Expand All @@ -29,12 +28,11 @@ Running pipelines persist in 3 pieces:

Some basic rules:

1. If the FlowNodeStorage is corrupt, incomplete, or un-persisted, all manner of heck will break loose
- In terms of Pipeline execution, the impact is like the Resonance Cascade from the Half-Life games
1. If the FlowNodeStorage is corrupt, incomplete, or un-persisted, various things will break
- The pipeline can never be resumed (the key piece is missing)
- Usually we fake up some placeholder FlowNodes to cover this situation and save them
2. Whenever persisting data, the Pipeline *must* have the FlowNodes persisted on disk (via `storage.flush()` generally)
in order to be able to load the heads and restore the program.
3. Once we've set persistedClean as false and saved the FlowExecution, then it doesn't matter what we do -- the Pipeline will assume
it already has incomplete persistence data (as with 1) when trying to resume. This is how we handle the low-durability modes, to
avoid resuming a stale state of the Pipeline simply because we have old data persisted and are not updating it.
avoid resuming a stale state of the Pipeline simply because we have old data persisted and are not updating it.

0 comments on commit 0383c6f

Please sign in to comment.