serverLog(REDIS_WARNING,"Redis needs to enable the AOF but can't open the append only file: %s",strerror(errno));
serverLog(LL_WARNING,"Redis needs to enable the AOF but can't open the append only file: %s",strerror(errno));
returnC_ERR;
returnC_ERR;
}
}
if(rewriteAppendOnlyFileBackground()==C_ERR){
if(rewriteAppendOnlyFileBackground()==C_ERR){
close(server.aof_fd);
close(server.aof_fd);
serverLog(REDIS_WARNING,"Redis needs to enable the AOF but can't trigger a background AOF rewrite operation. Check the above logs for more info about the error.");
serverLog(LL_WARNING,"Redis needs to enable the AOF but can't trigger a background AOF rewrite operation. Check the above logs for more info about the error.");
returnC_ERR;
returnC_ERR;
}
}
/* We correctly switched on AOF, now wait for the rewrite to be complete
/* We correctly switched on AOF, now wait for the rewrite to be complete
/* Otherwise fall trough, and go write since we can't wait
/* Otherwise fall trough, and go write since we can't wait
* over two seconds. */
* over two seconds. */
server.aof_delayed_fsync++;
server.aof_delayed_fsync++;
serverLog(REDIS_NOTICE,"Asynchronous AOF fsync is taking too long (disk is busy?). Writing the AOF buffer without waiting for fsync to complete, this may slow down Redis.");
serverLog(LL_NOTICE,"Asynchronous AOF fsync is taking too long (disk is busy?). Writing the AOF buffer without waiting for fsync to complete, this may slow down Redis.");
}
}
}
}
/* We want to perform a single write. This should be guaranteed atomic
/* We want to perform a single write. This should be guaranteed atomic
serverLog(REDIS_WARNING,"Can't seek the end of the AOF file: %s",
serverLog(LL_WARNING,"Can't seek the end of the AOF file: %s",
strerror(errno));
strerror(errno));
}else{
}else{
serverLog(REDIS_WARNING,
serverLog(LL_WARNING,
"AOF loaded anyway because aof-load-truncated is enabled");
"AOF loaded anyway because aof-load-truncated is enabled");
gotoloaded_ok;
gotoloaded_ok;
}
}
}
}
}
}
serverLog(REDIS_WARNING,"Unexpected end of file reading the append only file. You can: 1) Make a backup of your AOF file, then use ./redis-check-aof --fix <filename>. 2) Alternatively you can set the 'aof-load-truncated' configuration option to yes and restart the server.");
serverLog(LL_WARNING,"Unexpected end of file reading the append only file. You can: 1) Make a backup of your AOF file, then use ./redis-check-aof --fix <filename>. 2) Alternatively you can set the 'aof-load-truncated' configuration option to yes and restart the server.");
exit(1);
exit(1);
fmterr:/* Format error. */
fmterr:/* Format error. */
serverLog(REDIS_WARNING,"Bad file format reading the append only file: make a backup of your AOF file, then use ./redis-check-aof --fix <filename>");
serverLog(LL_WARNING,"Bad file format reading the append only file: make a backup of your AOF file, then use ./redis-check-aof --fix <filename>");
exit(1);
exit(1);
}
}
...
@@ -761,7 +761,7 @@ int rioWriteBulkObject(rio *r, robj *obj) {
...
@@ -761,7 +761,7 @@ int rioWriteBulkObject(rio *r, robj *obj) {
serverLog(REDIS_WARNING,"WARNING: the new maxmemory value set via CONFIG SET is smaller than the current memory usage. This will result in keys eviction and/or inability to accept new write commands depending on the maxmemory-policy.");
serverLog(LL_WARNING,"WARNING: the new maxmemory value set via CONFIG SET is smaller than the current memory usage. This will result in keys eviction and/or inability to accept new write commands depending on the maxmemory-policy.");