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

Do not lock the database during pruning #73

Closed
wants to merge 1 commit into from

Conversation

link2xt
Copy link
Contributor

@link2xt link2xt commented Dec 30, 2022

Pruning does network requests like calling the mailcow API. Holding the database write transaction for the duration of pruning is dangerous, because it may delay creating a new account in the new_email endpoint or make it timeout.

Fixes #72

@link2xt link2xt force-pushed the link2xt/prune-dont-lock-the-database branch from 00a5c8d to d0649b4 Compare December 30, 2022 20:58
@link2xt link2xt force-pushed the link2xt/prune-dont-lock-the-database branch from d0649b4 to e045cac Compare December 30, 2022 21:11
Base automatically changed from cleanup-threads to master December 30, 2022 21:13
Pruning does network requests like calling the mailcow API.
Holding the database write transaction for the duration
of pruning is dangerous, because it may delay creating
a new account in the new_email endpoint or make it timeout.
@link2xt
Copy link
Contributor Author

link2xt commented Dec 30, 2022

Closed in favor of #75

@link2xt link2xt closed this Dec 30, 2022
@link2xt link2xt deleted the link2xt/prune-dont-lock-the-database branch December 30, 2022 21:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Do not hold write transaction in prune() loop
1 participant