Skip to content

fix(coderd/database): reduce db load via dbpurge advisory locking #13021

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

Merged
merged 1 commit into from
Apr 22, 2024

Conversation

mafredri
Copy link
Member

@mafredri mafredri commented Apr 22, 2024

This PR adds advisory locking for dbpurge.

We now run everything in a single transaction because dbmem doesn't support using the transaction as a mutex to run parallel queries outside the transaction.

@mafredri mafredri requested review from mtojek and kylecarbs April 22, 2024 10:57
@mafredri mafredri force-pushed the mafredri/fix-coderd-database-add-dbpurge-lock branch from e189af3 to c192dbf Compare April 22, 2024 10:58
Copy link
Member

@mtojek mtojek left a comment

Choose a reason for hiding this comment

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

👍

@mafredri mafredri force-pushed the mafredri/fix-coderd-database-add-dbpurge-lock branch from c192dbf to 79a4b20 Compare April 22, 2024 11:01
@mafredri mafredri enabled auto-merge (squash) April 22, 2024 11:02
@mafredri mafredri merged commit 3adcccb into main Apr 22, 2024
25 checks passed
@mafredri mafredri deleted the mafredri/fix-coderd-database-add-dbpurge-lock branch April 22, 2024 11:10
@github-actions github-actions bot locked and limited conversation to collaborators Apr 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants