This PR updates the execution database table to address deletion performance concerns and issues related to the goals of 3320.
Reviewers take note - this PR includes only the code/technical changes, the user doc is going to be a separate PR based on the commentary in this review. An API documentation PR will also be issued.
Added endpoint /executions/bulkDeleteExecutionsByCollection to allow
bulk deletion of executions from elasticsearch by collectionId
Added Bulk Execution Delete migration type to async operations types
Updated executions table (please see Migration section and Upgrade
Instructions for more information) to:
Add index on collection_cumulus_id
Add index on parent_cumulus_id
Update executions_parent_cumulus_id_foreign constraint to add ON DELETE SET NULL. This change will cause deletions in the execution table to
allow deletion of parent executions, when this occurs the child will have
it's parent reference set to NULL as part of the deletion operations.
Added endpoint /executions/bulkDeleteExecutionsByCollection to allow
bulk deletion of executions from elasticsearch by collectionId
Added Bulk Execution Delete migration type to async operations types
Fixed
Updated executions table (please see Migration section and Upgrade
Instructions for more information) to:
Add index on collection_cumulus_id
Add index on parent_cumulus_id
Update executions_parent_cumulus_id_foreign constraint to add ON DELETE SET NULL. This change will cause deletions in the execution table to
allow deletion of parent executions, when this occurs the child will have
it's parent reference set to NULL as part of the deletion operations.
Execution database deletions by cumulus_id should have greatly improved
performance as a table scan will no longer be required for each record
deletion to validate parent-child relationships
PR Checklist
[x] Update CHANGELOG
[x] Unit tests
[x] Ad-hoc testing - Deploy changes and test manually
Summary: Summary of changes
This PR updates the execution database table to address deletion performance concerns and issues related to the goals of 3320.
Reviewers take note - this PR includes only the code/technical changes, the user doc is going to be a separate PR based on the commentary in this review. An API documentation PR will also be issued.
Addresses CUMULUS-3320
Changes
Added
/executions/bulkDeleteExecutionsByCollection
to allow bulk deletion of executions from elasticsearch by collectionIdBulk Execution Delete
migration type to async operations typescollection_cumulus_id
parent_cumulus_id
executions_parent_cumulus_id_foreign
constraint to addON DELETE SET NULL
. This change will cause deletions in the execution table to allow deletion of parent executions, when this occurs the child will have it's parent reference set to NULL as part of the deletion operations./executions/bulkDeleteExecutionsByCollection
to allow bulk deletion of executions from elasticsearch by collectionIdBulk Execution Delete
migration type to async operations typesFixed
collection_cumulus_id
parent_cumulus_id
executions_parent_cumulus_id_foreign
constraint to addON DELETE SET NULL
. This change will cause deletions in the execution table to allow deletion of parent executions, when this occurs the child will have it's parent reference set to NULL as part of the deletion operations.cumulus_id
should have greatly improved performance as a table scan will no longer be required for each record deletion to validate parent-child relationshipsPR Checklist