"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/rdb.c" between
redis-6.2.4.tar.gz and redis-6.2.5.tar.gz

About: redis is an advanced key-value store. It is often referred to as a data structure server since keys can contain strings, hashes, lists, sets and sorted sets.

rdb.c  (redis-6.2.4):rdb.c  (redis-6.2.5)
skipping to change at line 2485 skipping to change at line 2485
decrRefCount(auxval); decrRefCount(auxval);
continue; /* Read type again. */ continue; /* Read type again. */
} else if (type == RDB_OPCODE_MODULE_AUX) { } else if (type == RDB_OPCODE_MODULE_AUX) {
/* Load module data that is not related to the Redis key space. /* Load module data that is not related to the Redis key space.
* Such data can be potentially be stored both before and after the * Such data can be potentially be stored both before and after the
* RDB keys-values section. */ * RDB keys-values section. */
uint64_t moduleid = rdbLoadLen(rdb,NULL); uint64_t moduleid = rdbLoadLen(rdb,NULL);
int when_opcode = rdbLoadLen(rdb,NULL); int when_opcode = rdbLoadLen(rdb,NULL);
int when = rdbLoadLen(rdb,NULL); int when = rdbLoadLen(rdb,NULL);
if (rioGetReadError(rdb)) goto eoferr; if (rioGetReadError(rdb)) goto eoferr;
if (when_opcode != RDB_MODULE_OPCODE_UINT) if (when_opcode != RDB_MODULE_OPCODE_UINT) {
rdbReportReadError("bad when_opcode"); rdbReportReadError("bad when_opcode");
goto eoferr;
}
moduleType *mt = moduleTypeLookupModuleByID(moduleid); moduleType *mt = moduleTypeLookupModuleByID(moduleid);
char name[10]; char name[10];
moduleTypeNameByID(name,moduleid); moduleTypeNameByID(name,moduleid);
if (!rdbCheckMode && mt == NULL) { if (!rdbCheckMode && mt == NULL) {
/* Unknown module. */ /* Unknown module. */
serverLog(LL_WARNING,"The RDB file contains AUX module data I ca n't load: no matching module '%s'", name); serverLog(LL_WARNING,"The RDB file contains AUX module data I ca n't load: no matching module '%s'", name);
exit(1); exit(1);
} else if (!rdbCheckMode && mt != NULL) { } else if (!rdbCheckMode && mt != NULL) {
if (!mt->aux_load) { if (!mt->aux_load) {
skipping to change at line 2510 skipping to change at line 2512
} }
RedisModuleIO io; RedisModuleIO io;
moduleInitIOContext(io,mt,rdb,NULL); moduleInitIOContext(io,mt,rdb,NULL);
io.ver = 2; io.ver = 2;
/* Call the rdb_load method of the module providing the 10 bit /* Call the rdb_load method of the module providing the 10 bit
* encoding version in the lower 10 bits of the module ID. */ * encoding version in the lower 10 bits of the module ID. */
if (mt->aux_load(&io,moduleid&1023, when) != REDISMODULE_OK || i o.error) { if (mt->aux_load(&io,moduleid&1023, when) != REDISMODULE_OK || i o.error) {
moduleTypeNameByID(name,moduleid); moduleTypeNameByID(name,moduleid);
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); 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); goto eoferr;
} }
if (io.ctx) { if (io.ctx) {
moduleFreeContext(io.ctx); moduleFreeContext(io.ctx);
zfree(io.ctx); zfree(io.ctx);
} }
uint64_t eof = rdbLoadLen(rdb,NULL); uint64_t eof = rdbLoadLen(rdb,NULL);
if (eof != RDB_MODULE_OPCODE_EOF) { 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); 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); goto eoferr;
} }
continue; 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. */ continue; /* Read next opcode. */
} }
} }
 End of changes. 4 change blocks. 
3 lines changed or deleted 5 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)