-
Notifications
You must be signed in to change notification settings - Fork 550
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
[sqlite] Mitigate the database locked problem for skylet config #1509
Conversation
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.
Nice! There may be some perf implications of using WAL but we can observe.
From user report this line errors out:
from sky.skylet import configs
Is it possible to also revise the repro to test the above statement?
BTW: Do we know why #1458's snippet using bash doesn't repro this db-is-locked error, but the snippet using mp.Pool() does? |
According to the document of sqlite, there will be 1%-2% performance degradation, which sounds ok to me, if it fix the locking problem for us.
I tried to modify the reproduce snippets to get that error, but failed. We may need still keep an eye on the problem.
I adds the following snippets from #1458 into the multiple process, and the database locked problem happens for the master branch. I think one reason might be that we are testing 100 times for the 100 processes, which have better chance to have two writes happens at the same time?
I would like to have this PR in first as it can at least mitigate the locking problem. We can keep an eye on the locking issue with the |
Sounds good! Thanks for the details. LGTM. |
Describe the changes in this PR:
This PR is to mitigate the problem in #1507
Enable the WAL mode for the database we are using for autostop to eliminate the undesired locking.
After this PR, the snippet in #1507 fails 1/30, while it fails 30/30 when using the current master branch.
Future TODO:
Tested (run the relevant ones):
sky launch -c min -i 10 examples/minimal.yaml