mirror of
https://github.com/corda/corda.git
synced 2024-12-24 07:06:44 +00:00
668748b054
* CORDA-3669 Do not execute `ExecuteAsyncOperation` multiple times When a `FlowExternalOperation` or `FlowExternalAsyncOperation` executes and completes a flag (`isFlowResumed`) is switched to true. This flag was used inside of `DoRemainingWorkTransition` to decide whether to skip over the execution of an event. Since this flag was being switched to true when the external operation's future completed, it was possible for _unexpected_ events to be placed in the fiber's queue that would retrigger the `FlowIORequest.ExecuteAsyncOperation`, that is held as the checkpoint's next `FlowIORequest`to process. By using the existing `StateMachineState.isTransactionTracked` (and renaming it to `isWaitingForFuture`) we can decide to not process the `FlowIORequest.ExecuteAsyncOperation` if it has already been called before. This moves this code path in line with `FlowIORequest.WaitForLedgerCommit`. Random `DoRemainingWork` events can now be pushed to the fiber's queue without causing the `FlowIORequest.ExecuteAsyncOperation` to execute again. |
||
---|---|---|
.. | ||
capsule | ||
djvm | ||
src | ||
build.gradle |