-
Notifications
You must be signed in to change notification settings - Fork 93
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
cylc clean's advice on which to find the database file to remove to fix issues could be better #6165
Comments
Bigger question, why are you getting corrupted databases! This should not happen and hints at a deeper problem. Filesystem locks and sqlite implementation should mean that this is not possible. This page outlines the circumstances under which corruption can happen: https://sqlite.org/howtocorrupt.html
Yes, Cylc maintains two databases, a "private" database in the Due to the nature of sqlite, parallel access can potentially result in DB locking issues. The Cylc scheduler will detect a locked public database and recover it from the private database. So the public database serves to isolate the scheduler's database from external interference. |
The |
Closed by #6234? |
@jarich, we've changed the error message slightly as requested. However, this isn't something that should be possible, corrupted databases are a cause for concern. I'll close this issue now, but feel free to follow up on the database issue. |
Description
Sometimes we end up with corrupted databases. Running a
cylc clean
on these gives us the error:Deleting
$HOME/cylc-run/workflow_pp/runN/log/db
doesn't fix the error.Delving into the code shows that it specifically references
$HOME/cylc-run/workflow_pp/runN/.service/db
. Deleting this db resolves the issue and the workflow is cleaned up.It appears there are two (usually identical?) copies of the database. These definitely aren't the same file:
Deliberately corrupting
$HOME/cylc-run/workflow_pp/runN/.service/db
suggests that I can "recover" the database by copying$HOME/cylc-run/workflow_pp/runN/log/db
over the top of$HOME/cylc-run/workflow_pp/runN/.service/db
.Reproducible Example
.service/db
:> $HOME/cylc-run/workflow_pp/runN/.service/db
cylc clean workflow_pp
# Note it failsrm $HOME/cylc-run/workflow_pp/runN/log/db
cylc clean workflow_pp
# Note it continues to failExpected Behaviour
Error message would advise that
$HOME/cylc-run/workflow_pp/runN/.service/db
, specifically, needs to be deleted. For example:The text was updated successfully, but these errors were encountered: