mirror of
https://github.com/fluencelabs/redis
synced 2025-06-12 08:41:21 +00:00
Merge pull request #6235 from oranagra/module_rdb_load_errors
Allow modules to handle RDB loading errors.
This commit is contained in:
@ -1139,8 +1139,15 @@ void restartAOFAfterSYNC() {
|
||||
|
||||
static int useDisklessLoad() {
|
||||
/* compute boolean decision to use diskless load */
|
||||
return server.repl_diskless_load == REPL_DISKLESS_LOAD_SWAPDB ||
|
||||
int enabled = server.repl_diskless_load == REPL_DISKLESS_LOAD_SWAPDB ||
|
||||
(server.repl_diskless_load == REPL_DISKLESS_LOAD_WHEN_DB_EMPTY && dbTotalServerKeyCount()==0);
|
||||
/* Check all modules handle read errors, otherwise it's not safe to use diskless load. */
|
||||
if (enabled && !moduleAllDatatypesHandleErrors()) {
|
||||
serverLog(LL_WARNING,
|
||||
"Skipping diskless-load because there are modules that don't handle read errors.");
|
||||
enabled = 0;
|
||||
}
|
||||
return enabled;
|
||||
}
|
||||
|
||||
/* Helper function for readSyncBulkPayload() to make backups of the current
|
||||
|
Reference in New Issue
Block a user