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. */
| 4706 | * modules this cannot be recovered, but if the module declared capability |
| 4707 | * to handle errors, we'll raise a flag rather than exiting. */ |
| 4708 | void 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 |
no test coverage detected