serverLog(LL_WARNING,"AOF was enabled but there is already a child process saving an RDB file on disk. An AOF background was scheduled to start when possible.");
serverLog(LL_WARNING,"AOF was enabled but there is already another background operation. An AOF background was scheduled to start when possible.");
}else{
}else{
/* If there is a pending AOF rewrite, we need to switch it off and
/* If there is a pending AOF rewrite, we need to switch it off and
* start a new one: the old one cannot be reused because it is not
* start a new one: the old one cannot be reused because it is not
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.");
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.");
@@ -2009,14 +2135,37 @@ int rdbLoadRio(rio *rdb, rdbSaveInfo *rsi, int loading_aof) {
...
@@ -2009,14 +2135,37 @@ int rdbLoadRio(rio *rdb, rdbSaveInfo *rsi, int loading_aof) {
serverLog(LL_WARNING,"The RDB file contains AUX module data I can't load: no matching module '%s'",name);
serverLog(LL_WARNING,"The RDB file contains AUX module data I can't load: no matching module '%s'",name);
exit(1);
exit(1);
}elseif(!rdbCheckMode&&mt!=NULL){
}elseif(!rdbCheckMode&&mt!=NULL){
/* This version of Redis actually does not know what to do
if(!mt->aux_load){
* with modules AUX data... */
/* Module doesn't support AUX. */
serverLog(LL_WARNING,"The RDB file contains AUX module data I can't load for the module '%s'. Probably you want to use a newer version of Redis which implements aux data callbacks",name);
serverLog(LL_WARNING,"The RDB file contains module AUX data, but the module '%s' doesn't seem to support it.",name);
exit(1);
exit(1);
}
RedisModuleIOio;
moduleInitIOContext(io,mt,rdb,NULL);
io.ver=2;
/* Call the rdb_load method of the module providing the 10 bit
* encoding version in the lower 10 bits of the module ID. */
serverLog(LL_WARNING,"The RDB file contains module AUX data for the module type '%s', that the responsible module is not able to load. Check for modules log above for additional clues.",name);
exit(1);
}
if(io.ctx){
moduleFreeContext(io.ctx);
zfree(io.ctx);
}
uint64_teof=rdbLoadLen(rdb,NULL);
if(eof!=RDB_MODULE_OPCODE_EOF){
serverLog(LL_WARNING,"The RDB file contains module AUX data for the module '%s' that is not terminated by the proper module value EOF marker",name);
exit(1);
}
continue;
}else{
}else{
/* RDB check mode. */
/* RDB check mode. */
robj*aux=rdbLoadCheckModuleValue(rdb,name);
robj*aux=rdbLoadCheckModuleValue(rdb,name);
decrRefCount(aux);
decrRefCount(aux);
continue;/* Read next opcode. */
}
}
}
}
...
@@ -2070,10 +2219,15 @@ int rdbLoadRio(rio *rdb, rdbSaveInfo *rsi, int loading_aof) {
...
@@ -2070,10 +2219,15 @@ int rdbLoadRio(rio *rdb, rdbSaveInfo *rsi, int loading_aof) {
}
}
returnC_OK;
returnC_OK;
eoferr:/* unexpected end of file is handled here with a fatal exit */
/* Unexpected end of file is handled here calling rdbReportReadError():
serverLog(LL_WARNING,"Short read or OOM loading DB. Unrecoverable error, aborting now.");
* this will in turn either abort Redis in most cases, or if we are loading