@@ -406,7 +406,7 @@ replicas, or to continue the replication after a disconnection.
...
@@ -406,7 +406,7 @@ replicas, or to continue the replication after a disconnection.
Other C files
Other C files
---
---
*`t_hash.c`, `t_list.c`, `t_set.c`, `t_string.c` and `t_zset.c` contains the implementation of the Redis data types. They implement both an API to access a given data type, and the client commands implementations for these data types.
*`t_hash.c`, `t_list.c`, `t_set.c`, `t_string.c`, `t_zset.c` and `t_stream.c` contains the implementation of the Redis data types. They implement both an API to access a given data type, and the client commands implementations for these data types.
*`ae.c` implements the Redis event loop, it's a self contained library which is simple to read and understand.
*`ae.c` implements the Redis event loop, it's a self contained library which is simple to read and understand.
*`sds.c` is the Redis string library, check http://github.com/antirez/sds for more information.
*`sds.c` is the Redis string library, check http://github.com/antirez/sds for more information.
*`anet.c` is a library to use POSIX networking in a simpler way compared to the raw interface exposed by the kernel.
*`anet.c` is a library to use POSIX networking in a simpler way compared to the raw interface exposed by the kernel.
@@ -2027,14 +2143,37 @@ int rdbLoadRio(rio *rdb, rdbSaveInfo *rsi, int loading_aof) {
...
@@ -2027,14 +2143,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. */
}
}
}
}
...
@@ -2088,10 +2227,15 @@ int rdbLoadRio(rio *rdb, rdbSaveInfo *rsi, int loading_aof) {
...
@@ -2088,10 +2227,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