mirror of
https://github.com/corda/corda.git
synced 2025-02-07 03:29:19 +00:00
* 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 b71e78f20274ab0f5b3cf3fda1451ae2bd7a6797. * 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>