refactor(core): Remove crash recovery from error
executions (no-changelog)
#9551
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.
Crash recovery amends an execution using event logs and then runs post-execution hooks. This recovery is only intended for an execution truncated by an instance crash, is only performed by a main process (i.e. no crash recovery for production executions in queue mode), and is being triggered...
EventBus
during server startup, andWorkflowRunner.processError
, which is called from two catch clauses inWorkflowRunner.runMainProcess
(main mode) and from three catch clauses inWorkflowRunner.enqueueExecution
(queue mode).If an execution has reached
WorkflowRunner.processError
, then we know the execution has failed, i.e. it finished with anerror
status, rather than being truncated by an instance crash. A failed execution already has the data that is populated by the crash recovery mechanism:executionData.resultData.runData
,executionData.resultData.error
,status
, andstoppedAt
.Hence there should be no use in crash recovery for
error
executions.Follow-up to: #9512