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

[LSC] Aquire daemon lock before opening db #1487

Merged
merged 1 commit into from
Dec 11, 2023
Merged

Conversation

JakeSiFive
Copy link
Contributor

Previously we (unintentionally) would open the database BEFORE inquiring the cache lock. The vast majority of the time this is harmless because we connect to the database with randomized exponential backoff and sqlite3 does a good enough job at this with this back off strategy. Later once the cache fails to aquire the cache lock the connection is closed and no harm was done. However it can get overwhelmed and cause issues. The solution is simple, just move the lock acquire to be first like it should have always been.

Copy link
Contributor

@colinschmidt colinschmidt left a comment

Choose a reason for hiding this comment

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

LGTM

@JakeSiFive JakeSiFive merged commit 23e79b1 into master Dec 11, 2023
12 checks passed
@JakeSiFive JakeSiFive deleted the lock_before_db_open branch December 11, 2023 19:22
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.

2 participants