MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / moduleRDBLoadError

Function moduleRDBLoadError

src/module.cpp:4708–4722  ·  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

4706 * modules this cannot be recovered, but if the module declared capability
4707 * to handle errors, we'll raise a flag rather than exiting. */
4708void moduleRDBLoadError(RedisModuleIO *io) {
4709 if (io->type->module->options & REDISMODULE_OPTIONS_HANDLE_IO_ERRORS) {
4710 io->error = 1;
4711 return;
4712 }
4713 serverPanic(
4714 "Error loading data from RDB (short read or EOF). "
4715 "Read performed by module '%s' about type '%s' "
4716 "after reading '%llu' bytes of a value "
4717 "for key named: '%s'.",
4718 io->type->module->name,
4719 io->type->name,
4720 (unsigned long long)io->bytes,
4721 io->key? szFromObj(io->key): "(null)");
4722}
4723
4724/* Returns 0 if there's at least one registered data type that did not declare
4725 * 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 1

szFromObjFunction · 0.85

Tested by

no test coverage detected