-
Notifications
You must be signed in to change notification settings - Fork 1.1k
perf: optimize migration 371 to run faster on large deployments #20906
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
coderd/database/migrations/000371_api_key_scopes_array_allow_list.up.sql
Outdated
Show resolved
Hide resolved
|
All contributors have signed the CLA ✍️ ✅ |
|
I have read the CLA Document and I hereby sign the CLA |
closes #20899 This is in response to a migration in v2.27 that takes very long on deployments with large `api_key` tables.
5f4307d to
47bba5b
Compare
Emyrk
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.
This looks good! I'll stamp after a meeting about this Wednesday morning CST
Emyrk
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.
Just blocking a merge for now. Will stamp again
closes #20899
This is in response to a migration in v2.27 that takes very long on deployments with large
api_keystables.NOTE: The optimization causes the up migration to delete old data (keys that expired more than 7 days ago). The down migration won't resurrect the deleted data.