Hang normalizing folder after schema upgrade: Closes #5542
The problem was that the database busy timeout was too short. Charles' Geary folder required ~1700 updates, which was longer than the 1 second timeout allowed.
This commit is contained in:
parent
74dbcf5f1f
commit
83de20c82d
2 changed files with 7 additions and 1 deletions
|
|
@ -18,6 +18,12 @@
|
|||
public class Geary.Db.Connection : Geary.Db.Context {
|
||||
public const int DEFAULT_BUSY_TIMEOUT_MSEC = 0;
|
||||
|
||||
/**
|
||||
* This value gives a generous amount of time for SQLite to finish a big write operation and
|
||||
* relinquish the lock to other waiting transactions.
|
||||
*/
|
||||
public const int RECOMMENDED_BUSY_TIMEOUT_MSEC = 30 * 1000;
|
||||
|
||||
private const string PRAGMA_FOREIGN_KEYS = "foreign_keys";
|
||||
private const string PRAGMA_RECURSIVE_TRIGGERS = "recursive_triggers";
|
||||
private const string PRAGMA_USER_VERSION = "user_version";
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
private class Geary.ImapDB.Database : Geary.Db.VersionedDatabase {
|
||||
private const string DB_FILENAME = "geary.db";
|
||||
private const int BUSY_TIMEOUT_MSEC = 1000;
|
||||
private const int BUSY_TIMEOUT_MSEC = Db.Connection.RECOMMENDED_BUSY_TIMEOUT_MSEC;
|
||||
|
||||
public Database(File db_dir, File schema_dir) {
|
||||
base (db_dir.get_child(DB_FILENAME), schema_dir);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue