Skip to content

Prevent db locking when multiple queries from quay are accessing same tables (PROJQUAY-8758) #198

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

harishsurf
Copy link
Contributor

This PR sets PRAGMA journal_mode=WAL to the quay's sqlite file to improve speed and reduce lock contention in multi-access scenarios.

Testing:
Ran oc mirror, during mirroring delete the repo being mirrored. Repository GC worker tries to clean up the repo while the mirroring is also writing to the repo. Since both processes are in contention to write to the same table, sqlite throws database is locked. This error is not seen in after setting the database to WAL

@harishsurf harishsurf added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed ok-to-test Indicates a non-member PR verified by an org member that is safe to test. labels Apr 16, 2025
@harishsurf harishsurf added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed ok-to-test Indicates a non-member PR verified by an org member that is safe to test. labels Apr 17, 2025
@harishsurf harishsurf added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed ok-to-test Indicates a non-member PR verified by an org member that is safe to test. labels Jul 29, 2025
@harishsurf harishsurf added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed ok-to-test Indicates a non-member PR verified by an org member that is safe to test. labels Jul 29, 2025
@harishsurf harishsurf added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed ok-to-test Indicates a non-member PR verified by an org member that is safe to test. labels Jul 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ok-to-test Indicates a non-member PR verified by an org member that is safe to test.
Development

Successfully merging this pull request may close these issues.

1 participant