corda/testing
Dan Newton c2fd8253ea
CORDA-3777 Reload after every checkpoint (#6494)
Enable reloading of a flow after every checkpoint is saved. This
includes reloading the checkpoint from the database and recreating the
fiber.

When a flow and its `StateMachineState` is created it checks the node's
config to see if the `reloadCheckpointAfterSuspend` is set to true. If it is
it initialises `StateMachineState.reloadCheckpointAfterSuspendCount`
with the value 0. Otherwise, it remains `null`.

This count represents how many times the flow has reloaded from its
checkpoint (not the same as retrying). It is incremented every time the
flow is reloaded.

When a flow suspends, it processes the suspend event like usual, but
it will now also check if `reloadCheckpointAfterSuspendCount` is not
`null` (that it is activated) and process a 
`ReloadFlowFromCheckpointAfterSuspend`event, if and only if 
`reloadCheckpointAfterSuspendCount` is greater than
`CheckpointState.numberOfSuspends`.

This means idempotent flows can reload from the start and not reload
again until reaching a new suspension point.

Flows that skip checkpoints can reload from a previously saved
checkpoint (or from the initial checkpoint) and will continue reloading
on reaching the next new suspension point (not the suspension point that
it skipped saving).

If the flow fails to deserialize the checkpoint from the database upon
reloading a `ReloadFlowFromCheckpointException` is throw. This causes
the flow to be kept for observation.
2020-07-28 16:27:51 +01:00
..
cordapps/dbfailure CORDA-3644: Add Corda-Testing tag to test artifacts' MANIFEST.MF. (#6032) 2020-03-05 17:39:55 +00:00
core-test-utils CORDA-3717: Apply custom serializers to checkpoints (#6392) 2020-07-22 17:31:59 +01:00
node-driver CORDA-3777 Reload after every checkpoint (#6494) 2020-07-28 16:27:51 +01:00
smoke-test-utils Merge commit '5b50ef49bcca2d1be8bb0604e1be167e3bb5da24' into chrisr3-44-merge 2020-03-06 09:55:00 +00:00
test-cli CORDA-3644: Add Corda-Testing tag to test artifacts' MANIFEST.MF. (#6032) 2020-03-05 17:39:55 +00:00
test-common CORDA-3845: Update BC, log4j, slf4j (#6464) 2020-07-23 16:37:29 +01:00
test-db CORDA-3845: Update BC, log4j, slf4j (#6464) 2020-07-23 16:37:29 +01:00
test-utils CORDA-3769: Switched attachments class loader cache to use caffeine (#6326) 2020-07-16 09:58:36 +01:00
testserver NOTICK: Fix some Gradle technical debt. (#6430) 2020-07-07 09:08:58 +01:00
Dockerfile Webook test branch (#5528) 2019-10-08 16:33:24 +02:00
DockerfileBase use zulu for jdk in testing image (#5583) 2019-10-14 13:35:22 +01:00
DockerfileJDK11Azul INFRA-357 Publish build tag (#6375) 2020-06-20 11:08:52 +01:00