Merge pull request #6847 from oranagra/module_read_err_panic

moduleRDBLoadError, add key name, and use panic rather than exit
This commit is contained in:
Salvatore Sanfilippo 2020-02-06 10:31:29 +01:00 committed by GitHub
commit 08b218bfa5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3649,14 +3649,15 @@ void moduleRDBLoadError(RedisModuleIO *io) {
io->error = 1;
return;
}
serverLog(LL_WARNING,
serverPanic(
"Error loading data from RDB (short read or EOF). "
"Read performed by module '%s' about type '%s' "
"after reading '%llu' bytes of a value.",
"after reading '%llu' bytes of a value "
"for key named: '%s'.",
io->type->module->name,
io->type->name,
(unsigned long long)io->bytes);
exit(1);
(unsigned long long)io->bytes,
io->key? (char*)io->key->ptr: "(null)");
}
/* Returns 0 if there's at least one registered data type that did not declare