-
Notifications
You must be signed in to change notification settings - Fork 59
Disable UpdateHistory for SV and Splitwell apps #2675
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
[ci] Signed-off-by: Oriol Muñoz <oriol.munoz@digitalasset.com>
Signed-off-by: Oriol Muñoz <oriol.munoz@digitalasset.com>
| scanConnection <- createScanConnection() | ||
| recordTimeRangeO <- scanConnection | ||
| .getMigrationInfo(migrationId) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pay attention to this change
Signed-off-by: Oriol Muñoz <oriol.munoz@digitalasset.com>
Signed-off-by: Oriol Muñoz <oriol.munoz@digitalasset.com>
Signed-off-by: Oriol Muñoz <oriol.munoz@digitalasset.com>
Signed-off-by: Oriol Muñoz <oriol.munoz@digitalasset.com>
Signed-off-by: Oriol Muñoz <oriol.munoz@digitalasset.com>
| from update_history_descriptors; | ||
|
|
||
| IF descriptors = '{"DbSvDsoStore", "DbSvSvStore"}' THEN | ||
| RAISE NOTICE 'Truncating update history tables as only SV app descriptors are present. Descriptors: %', descriptors::text; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| select array_agg(store_name order by store_name) into descriptors | ||
| from update_history_descriptors; | ||
|
|
||
| IF descriptors = '{"DbSvDsoStore", "DbSvSvStore"}' THEN |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is more strict than it needs to be - some of the descriptors in the update_history_descriptors might not be used by the tables that we want to truncate.
Also, in case someone has a very stupid production setup where multiple apps write into the same database, this will fail to delete the unused data.
I still think it's fine as is, in real setups it should work and worst case it just leaves around unused data.
rautenrieth-da
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Nice cleanup of the useless case dbStorage: DbStorage 🎉
| select array_agg(store_name order by store_name) into descriptors | ||
| from update_history_descriptors; | ||
|
|
||
| IF descriptors = '{"DbSvDsoStore", "DbSvSvStore"}' THEN |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is more strict than it needs to be - some of the descriptors in the update_history_descriptors might not be used by the tables that we want to truncate.
Also, in case someone has a very stupid production setup where multiple apps write into the same database, this will fail to delete the unused data.
I still think it's fine as is, in real setups it should work and worst case it just leaves around unused data.
| EXECUTE 'TRUNCATE TABLE update_history_assignments CASCADE'; | ||
| EXECUTE 'TRUNCATE TABLE update_history_unassignments CASCADE'; | ||
| EXECUTE 'TRUNCATE TABLE update_history_backfilling CASCADE'; | ||
| EXECUTE 'TRUNCATE TABLE update_history_creates CASCADE'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note to self: The acs_snapshot_data table has a foreign key constraint to update_history_creates. We don't need to truncate acs_snapshot_data because the SV app doesn't write any data into it (and we'd rather fail if there is any unexpected data in there after all).
apps/splitwell/src/main/scala/org/lfdecentralizedtrust/splice/splitwell/SplitwellApp.scala
Show resolved
Hide resolved
...n/scala/org/lfdecentralizedtrust/splice/sv/automation/singlesv/SequencerPruningTrigger.scala
Show resolved
Hide resolved
...allet/src/main/scala/org/lfdecentralizedtrust/splice/wallet/ExternalPartyWalletService.scala
Show resolved
Hide resolved
Signed-off-by: Oriol Muñoz <oriol.munoz@digitalasset.com>
Signed-off-by: Oriol Muñoz <oriol.munoz@digitalasset.com>
Signed-off-by: Oriol Muñoz <oriol.munoz@digitalasset.com>
* Make scanConfig mandatory in SV app [ci] let's see what breaks Signed-off-by: Oriol Muñoz <oriol.munoz@digitalasset.com> * [ci] docs Signed-off-by: Oriol Muñoz <oriol.munoz@digitalasset.com> * [ci] run pls gh Signed-off-by: Oriol Muñoz <oriol.munoz@digitalasset.com> * update helm json schema Signed-off-by: Oriol Muñoz <oriol.munoz@digitalasset.com> * [ci] release notes fix Signed-off-by: Oriol Muñoz <oriol.munoz@digitalasset.com> --------- Signed-off-by: Oriol Muñoz <oriol.munoz@digitalasset.com>
ray-roestenburg-da
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
Signed-off-by: Oriol Muñoz <oriol.munoz@digitalasset.com>
…abs/splice into oriol/non-optional-metrics Signed-off-by: Oriol Muñoz <oriol.munoz@digitalasset.com>
Signed-off-by: Oriol Muñoz <oriol.munoz@digitalasset.com>
Signed-off-by: Oriol Muñoz <oriol.munoz@digitalasset.com>
Signed-off-by: Oriol Muñoz <oriol.munoz@digitalasset.com>
Signed-off-by: Oriol Muñoz <oriol.munoz@digitalasset.com>
Signed-off-by: Oriol Muñoz <oriol.munoz@digitalasset.com>
Signed-off-by: Oriol Muñoz <oriol.munoz@digitalasset.com>
Signed-off-by: Oriol Muñoz <oriol.munoz@digitalasset.com>
Signed-off-by: Oriol Muñoz <oriol.munoz@digitalasset.com>
|
/cluster_test |
Signed-off-by: Oriol Muñoz <oriol.munoz@digitalasset.com>
|
Deploy cluster test triggered for Commit 96524d57959afe97838bd2a09cb6c3af039b200f in , please contact a Contributor to approve it in CircleCI: https://app.circleci.com/pipelines/github/DACH-NY/canton-network-internal/41188 |
Signed-off-by: Oriol Muñoz <oriol.munoz@digitalasset.com>
|
/cluster_test |
|
Deploy cluster test triggered for Commit 0cb1b63238679493d19a8706148f0406104345e6 in , please contact a Contributor to approve it in CircleCI: https://app.circleci.com/pipelines/github/DACH-NY/canton-network-internal/41198 |


preflight
Fixes #1572
This PR removes the UpdateHistory from:
Includes also: