MCPcopy Create free account
hub / github.com/F-Stack/f-stack / moduleRDBLoadError

Function moduleRDBLoadError

app/redis-6.2.6/src/module.c:4603–4617  ·  view source on GitHub ↗

Called when there is a load error in the context of a module. On some * modules this cannot be recovered, but if the module declared capability * to handle errors, we'll raise a flag rather than exiting. */

Source from the content-addressed store, hash-verified

4601 * modules this cannot be recovered, but if the module declared capability
4602 * to handle errors, we'll raise a flag rather than exiting. */
4603void moduleRDBLoadError(RedisModuleIO *io) {
4604 if (io->type->module->options & REDISMODULE_OPTIONS_HANDLE_IO_ERRORS) {
4605 io->error = 1;
4606 return;
4607 }
4608 serverPanic(
4609 "Error loading data from RDB (short read or EOF). "
4610 "Read performed by module '%s' about type '%s' "
4611 "after reading '%llu' bytes of a value "
4612 "for key named: '%s'.",
4613 io->type->module->name,
4614 io->type->name,
4615 (unsigned long long)io->bytes,
4616 io->key? (char*)io->key->ptr: "(null)");
4617}
4618
4619/* Returns 0 if there's at least one registered data type that did not declare
4620 * REDISMODULE_OPTIONS_HANDLE_IO_ERRORS, in which case diskless loading should

Callers 4

RM_LoadUnsignedFunction · 0.85
moduleLoadStringFunction · 0.85
RM_LoadDoubleFunction · 0.85
RM_LoadFloatFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected