Remove RDB files used for replication in persistence-less instances.

This commit is contained in:
antirez
2020-03-03 14:58:11 +01:00
parent 07dc1b42fb
commit be4bc1a5be
3 changed files with 56 additions and 1 deletions

View File

@ -1455,12 +1455,20 @@ void updateDictResizePolicy(void) {
dictDisableResize();
}
/* Return true if there are no active children processes doing RDB saving,
* AOF rewriting, or some side process spawned by a loaded module. */
int hasActiveChildProcess() {
return server.rdb_child_pid != -1 ||
server.aof_child_pid != -1 ||
server.module_child_pid != -1;
}
/* Return true if this instance has persistence completely turned off:
* both RDB and AOF are disabled. */
int allPersistenceDisabled(void) {
return server.saveparamslen == 0 && server.aof_state == AOF_OFF;
}
/* ======================= Cron: called every 100 ms ======================== */
/* Add a sample to the operations per second array of samples. */