-
Couldn't load subscription status.
- Fork 43
[wait until 0.5.1] 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
base: main
Are you sure you want to change the base?
Conversation
[ci] Signed-off-by: Oriol Muñoz <[email protected]>
Signed-off-by: Oriol Muñoz <[email protected]>
| 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 <[email protected]>
Signed-off-by: Oriol Muñoz <[email protected]>
Signed-off-by: Oriol Muñoz <[email protected]>
Signed-off-by: Oriol Muñoz <[email protected]>
Signed-off-by: Oriol Muñoz <[email protected]>
Signed-off-by: Oriol Muñoz <[email protected]>
| 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.
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 <[email protected]>
Signed-off-by: Oriol Muñoz <[email protected]>
Signed-off-by: Oriol Muñoz <[email protected]>
* Make scanConfig mandatory in SV app [ci] let's see what breaks Signed-off-by: Oriol Muñoz <[email protected]> * [ci] docs Signed-off-by: Oriol Muñoz <[email protected]> * [ci] run pls gh Signed-off-by: Oriol Muñoz <[email protected]> * update helm json schema Signed-off-by: Oriol Muñoz <[email protected]> * [ci] release notes fix Signed-off-by: Oriol Muñoz <[email protected]> --------- Signed-off-by: Oriol Muñoz <[email protected]>
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


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