Skip to content
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

Improve delete_flow_run performance by avoiding slow deletion triggers #202

Merged
merged 7 commits into from
Mar 3, 2021

Conversation

zanieb
Copy link
Contributor

@zanieb zanieb commented Mar 3, 2021

Summary

  • Adds a transactional delete to delete_flow_run that first deletes task_run_states and task_runs outer -> innner rather than the default inner -> outer relationships
  • Uses the delete_flow_run API to delete auto-scheduled flow runs

Importance

Closes #200

Checklist

This PR:

  • [ ] adds new tests (if appropriate)
  • adds a change file in the changes/ directory (if appropriate)

@zanieb zanieb requested review from cicdw and jlowin as code owners March 3, 2021 18:28
@github-actions github-actions bot added the API label Mar 3, 2021
@codecov-io
Copy link

Codecov Report

Merging #202 (67b06b2) into master (46395c6) will increase coverage by 0.02%.
The diff coverage is 100.00%.

Copy link
Member

@cicdw cicdw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One-line change request, otherwise LGTM

src/prefect_server/api/runs.py Outdated Show resolved Hide resolved
src/prefect_server/api/runs.py Outdated Show resolved Hide resolved
src/prefect_server/api/runs.py Outdated Show resolved Hide resolved
@zanieb zanieb merged commit 9f899d7 into master Mar 3, 2021
@zanieb zanieb deleted the fix-flow-run-delete branch March 3, 2021 23:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Don't rely on cascading deletes when deleting flow runs
3 participants