redisLog(REDIS_WARNING,"Used tried to switch on AOF via CONFIG, but I can't open the AOF file: %s",strerror(errno));
return REDIS_ERR;
}
if (rewriteAppendOnlyFileBackground() == REDIS_ERR) {
server.appendonly = 0;
close(server.appendfd);
redisLog(REDIS_WARNING,"Used tried to switch on AOF via CONFIG, I can't trigger a background AOF rewrite operation. Check the above logs for more info about the error.",strerror(errno));
return REDIS_ERR;
}
return REDIS_OK;
}
/* Write the append only file buffer on disk.
/* Write the append only file buffer on disk.
*
*
* Since we are required to write the AOF before replying to the client,
* Since we are required to write the AOF before replying to the client,
...
@@ -8596,16 +8660,16 @@ static int rewriteAppendOnlyFile(char *filename) {
...
@@ -8596,16 +8660,16 @@ static int rewriteAppendOnlyFile(char *filename) {
int swapped;
int swapped;
key = dictGetEntryKey(de);
key = dictGetEntryKey(de);
o = dictGetEntryVal(de);
/* If the value for this key is swapped, load a preview in memory.
/* If the value for this key is swapped, load a preview in memory.
* We use a "swapped" flag to remember if we need to free the
* We use a "swapped" flag to remember if we need to free the
* value object instead to just increment the ref count anyway
* value object instead to just increment the ref count anyway
* in order to avoid copy-on-write of pages if we are forked() */
* in order to avoid copy-on-write of pages if we are forked() */
if (!server.vm_enabled || key->storage == REDIS_VM_MEMORY ||
if (!server.vm_enabled || o->storage == REDIS_VM_MEMORY ||
redisLog(REDIS_WARNING,"Used tried to switch on AOF via CONFIG, but I can't open the AOF file: %s",strerror(errno));
return REDIS_ERR;
}
if (rewriteAppendOnlyFileBackground() == REDIS_ERR) {
server.appendonly = 0;
close(server.appendfd);
redisLog(REDIS_WARNING,"Used tried to switch on AOF via CONFIG, I can't trigger a background AOF rewrite operation. Check the above logs for more info about the error.",strerror(errno));
return REDIS_ERR;
}
return REDIS_OK;
}
/* =================== Virtual Memory - Blocking Side ====================== */