fix(): Identify step that should require a save on checkpoint (#14037)
* fix(): Identify step that force save checkpoint * Create sour-peas-provide.md
This commit is contained in:
committed by
GitHub
parent
4e1c474dfa
commit
1ea932a56f
@@ -291,7 +291,6 @@ export class RedisDistributedTransactionStorage
|
||||
|
||||
const stepsArray = Object.values(data.flow.steps) as TransactionStep[]
|
||||
let currentStep!: TransactionStep
|
||||
let currentStepsIsAsync = false
|
||||
|
||||
const targetStates = isFlowInvoking
|
||||
? new Set([
|
||||
@@ -316,6 +315,7 @@ export class RedisDistributedTransactionStorage
|
||||
}
|
||||
}
|
||||
|
||||
let shouldStoreCurrentSteps = false
|
||||
if (currentStep) {
|
||||
for (const step of stepsArray) {
|
||||
if (step.id === "_root") {
|
||||
@@ -324,9 +324,9 @@ export class RedisDistributedTransactionStorage
|
||||
|
||||
if (
|
||||
step.depth === currentStep.depth &&
|
||||
step?.definition?.async === true
|
||||
step?.definition?.store === true
|
||||
) {
|
||||
currentStepsIsAsync = true
|
||||
shouldStoreCurrentSteps = true
|
||||
break
|
||||
}
|
||||
}
|
||||
@@ -334,7 +334,7 @@ export class RedisDistributedTransactionStorage
|
||||
|
||||
if (
|
||||
!(isNotStarted || isFinished || isWaitingToCompensate) &&
|
||||
!currentStepsIsAsync &&
|
||||
!shouldStoreCurrentSteps &&
|
||||
!asyncVersion
|
||||
) {
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user