Commit a678390e authored by Oran Agra's avatar Oran Agra Committed by antirez
Browse files

moduleRDBLoadError, add key name, and use panic rather than exit

using panic rather than exit means you get s stack trace of the code
path that experianced the error, and possibly other info.
parent 919fbf42
...@@ -3649,14 +3649,15 @@ void moduleRDBLoadError(RedisModuleIO *io) { ...@@ -3649,14 +3649,15 @@ void moduleRDBLoadError(RedisModuleIO *io) {
io->error = 1; io->error = 1;
return; return;
} }
serverLog(LL_WARNING, serverPanic(
"Error loading data from RDB (short read or EOF). " "Error loading data from RDB (short read or EOF). "
"Read performed by module '%s' about type '%s' " "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->module->name,
io->type->name, io->type->name,
(unsigned long long)io->bytes); (unsigned long long)io->bytes,
exit(1); io->key? (char*)io->key->ptr: "(null)");
} }
/* Returns 0 if there's at least one registered data type that did not declare /* Returns 0 if there's at least one registered data type that did not declare
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment