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