MCPcopy Create free account
hub / github.com/F-Stack/f-stack / useDisklessLoad

Function useDisklessLoad

app/redis-6.2.6/src/replication.c:1506–1517  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1504}
1505
1506static int useDisklessLoad() {
1507 /* compute boolean decision to use diskless load */
1508 int enabled = server.repl_diskless_load == REPL_DISKLESS_LOAD_SWAPDB ||
1509 (server.repl_diskless_load == REPL_DISKLESS_LOAD_WHEN_DB_EMPTY && dbTotalServerKeyCount()==0);
1510 /* Check all modules handle read errors, otherwise it's not safe to use diskless load. */
1511 if (enabled && !moduleAllDatatypesHandleErrors()) {
1512 serverLog(LL_WARNING,
1513 "Skipping diskless-load because there are modules that don't handle read errors.");
1514 enabled = 0;
1515 }
1516 return enabled;
1517}
1518
1519/* Helper function for readSyncBulkPayload() to make backups of the current
1520 * databases before socket-loading the new ones. The backups may be restored

Callers 2

readSyncBulkPayloadFunction · 0.85
syncWithMasterFunction · 0.85

Calls 2

dbTotalServerKeyCountFunction · 0.85

Tested by

no test coverage detected