diff options
author | Salvatore Sanfilippo <antirez@gmail.com> | 2020-02-06 10:31:29 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-06 10:31:29 +0100 |
commit | 08b218bfa5ac0b6cebd91e18af080cc105d26c10 (patch) | |
tree | eddf10ccddbb0518650095969443375613a7761b | |
parent | 5558c0e4cf85a1745c7d574fd6c7adadddb1adac (diff) | |
parent | 85cc696f50064327e81a41952ffb2be830048701 (diff) | |
download | redis-08b218bfa5ac0b6cebd91e18af080cc105d26c10.tar.gz |
Merge pull request #6847 from oranagra/module_read_err_panic
moduleRDBLoadError, add key name, and use panic rather than exit
-rw-r--r-- | src/module.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/module.c b/src/module.c index 914c50df3..16b191535 100644 --- a/src/module.c +++ b/src/module.c @@ -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 |