mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-24 04:09:49 +00:00
openAndSetUpSQLCipher: Enable checkpoint_fullfsync pragma
This commit is contained in:
@@ -700,6 +700,19 @@ function openAndSetUpSQLCipher(
|
||||
throw error;
|
||||
}
|
||||
|
||||
try {
|
||||
// fullfsync is only supported on macOS
|
||||
db.pragma('fullfsync = false');
|
||||
|
||||
// a lower-impact approach, if fullfsync is too impactful
|
||||
db.pragma('checkpoint_fullfsync = true');
|
||||
} catch (error) {
|
||||
logger.warn(
|
||||
'openAndSetUpSQLCipher: Unable to set fullfsync',
|
||||
Errors.toLogFormat(error)
|
||||
);
|
||||
}
|
||||
|
||||
return db;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user