Apparently, I managed to corrupt an SQLite DB when git-annex get
ran out of space. This prevents git-annex operations from
working at all now.
For example:
% git annex find --in .
sqlite worker thread crashed: SQLite3 returned ErrorError while attempting to perform prepare "SELECT null from content limit 1": no such table: content
git-annex: sqlite query crashed
One of the few mentions of SQLite being used is in incremental fsck (caching database). I did run incremental fsck in another repository a few days before this. The fsck finished without issues, so I'd be happy with a solution that involves simply deleting the DB or something.
- git-annex version: 6.20160527-gb7d4774
- All repositories/remotes: version 5, indirect
Delete .git/annex/keys/db
This database is not really needed unless your repository is in v6 mode.
In a v6 repository, the sqlite database is used to keep track of unlocked files. If all files are locked, the sqlite database can still be deleted safely.
I've done some experimentation with deleting the sqlite database when there are unlocked files, and it seems that running
git annex fsck
manages to recover the deleted state and restores the database.Also, since git-annex uses sqlite in WAL mode, it may be possible to recover the database to the last good state by deleting
.git/annex/keys/db-wal
. You'd still want to rungit annex fsck
.