CORDA-1622 Correct broken de-dup header logic on node restart for restored flows. Multi-threaded version. (#985)

This commit is contained in:
Rick Parker 2018-06-13 13:31:18 +01:00 committed by GitHub
parent 70a1a3a3d4
commit d95b1b0e6a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -364,8 +364,7 @@ class MultiThreadedStateMachineManager(
checkpoint = checkpoint, checkpoint = checkpoint,
initialDeduplicationHandler = null, initialDeduplicationHandler = null,
isAnyCheckpointPersisted = true, isAnyCheckpointPersisted = true,
isStartIdempotent = false, isStartIdempotent = false
senderUUID = null
) )
} else { } else {
// Just flow initiation message // Just flow initiation message
@ -664,8 +663,7 @@ class MultiThreadedStateMachineManager(
checkpoint: Checkpoint, checkpoint: Checkpoint,
isAnyCheckpointPersisted: Boolean, isAnyCheckpointPersisted: Boolean,
isStartIdempotent: Boolean, isStartIdempotent: Boolean,
initialDeduplicationHandler: DeduplicationHandler?, initialDeduplicationHandler: DeduplicationHandler?
senderUUID: String? = ourSenderUUID
): Flow { ): Flow {
val flowState = checkpoint.flowState val flowState = checkpoint.flowState
val resultFuture = openFuture<Any?>() val resultFuture = openFuture<Any?>()
@ -681,7 +679,7 @@ class MultiThreadedStateMachineManager(
isStartIdempotent = isStartIdempotent, isStartIdempotent = isStartIdempotent,
isRemoved = false, isRemoved = false,
flowLogic = logic, flowLogic = logic,
senderUUID = senderUUID senderUUID = null
) )
val fiber = FlowStateMachineImpl(id, logic, scheduler) val fiber = FlowStateMachineImpl(id, logic, scheduler)
fiber.transientValues = TransientReference(createTransientValues(id, resultFuture)) fiber.transientValues = TransientReference(createTransientValues(id, resultFuture))
@ -700,7 +698,7 @@ class MultiThreadedStateMachineManager(
isStartIdempotent = isStartIdempotent, isStartIdempotent = isStartIdempotent,
isRemoved = false, isRemoved = false,
flowLogic = fiber.logic, flowLogic = fiber.logic,
senderUUID = senderUUID senderUUID = null
) )
fiber.transientValues = TransientReference(createTransientValues(id, resultFuture)) fiber.transientValues = TransientReference(createTransientValues(id, resultFuture))
fiber.transientState = TransientReference(state) fiber.transientState = TransientReference(state)