corda/node
williamvigorr3 ab000e0533
CORDA-3597 Replace old Checkpoint table with new one. (#5992)
* Replace old Checkpoint table with new one.

Adds some of the new fields into the table where needed (I have
guessed this stuff but we can update it as we go along).

* Fix database constraints + name table correctly opps.

* Fixed typos in Liquidbase script

Also corrected constraints and added missed fields in hibernate
checkpoint class and liquibase scripts.

* Update CheckpointStorage to pass in serialization context.

This is cleaner than passing both the checkpoint and the
serialized checkpoint into the methods. Also fixed
CordaPersistanceServiceTests which I accidentally broke.

* Fix detekt problem

* Revert "Update CheckpointStorage to pass in serialization context."

This reverts commit b71e78f202.

* Fix test broken by reverting commit

* CORDA-3597 Update metadata join, timestamp columns and serialization

- Change the metadata join to the checkpoints table to use
  `invocation_id` instead of `flow_id`. There were issues joining
  between the tables because `flow_id` was not the primary key of the
  metadata table. Switching over to `invocation_id` has at least allowed
  us to bypass this issue. The information about the `invocation_id` is
  stored in the `Checkpoint` class which makes it simple to save at
  runtime.
- Some of timestamp columns were nullable when they should always be
  populated, the nullable flags have now been removed.
- Previously the whole checkpoint was being serialized and stored into
  the `checkpoints_blob.checkpoint` column. This meant duplicated saving
  as the `flow_state` was contained in this object. Only the
  `CheckpointState` property of `Checkpoint` is now being serialized and
  saved to this field. Furthermore, it now uses the default
  `STORAGE_CONTEXT` serialization (AMQP) instead of Kryo (which is only
  used for serializing the `flow_state` / flow stack).
- The checkpoint database performance metrics recording has been
  abstracted to its own class.

* CORDA-3597 Make metadata join non optional

Remove the nullable declaration on the metadata field of
`DBFlowCheckpoint`

* CORDA-3597 Rename `node_checkpoints_blobs` to `node_checkpoint_blobs`

* CORDA-3597 Update some kdocs

Co-authored-by: Dan Newton <danknewton@hotmail.com>
2020-03-02 10:04:48 +00:00
..
capsule CORDA-2876: Integrate the DJVM with the Corda Node. (#5633) 2019-11-05 13:44:18 +00:00
djvm CORDA-3377: Upgrade to DJVM 1.0-RC06. (#5866) 2020-01-21 09:05:23 +00:00
src CORDA-3597 Replace old Checkpoint table with new one. (#5992) 2020-03-02 10:04:48 +00:00
build.gradle Move jimfs dependency from node to test-utils. (#5911) 2020-01-31 10:55:05 +00:00