diff --git a/src/debug.c b/src/debug.c index e00263d8e..29e507e06 100644 --- a/src/debug.c +++ b/src/debug.c @@ -585,9 +585,11 @@ NULL aofLoadManifestFromDisk(); aofDelHistoryFiles(); int ret = loadAppendOnlyFiles(server.aof_manifest); - if (ret != AOF_OK && ret != AOF_EMPTY) - exit(1); unprotectClient(c); + if (ret != AOF_OK && ret != AOF_EMPTY) { + addReplyError(c, "Error trying to load the AOF files, check server logs."); + return; + } server.dirty = 0; /* Prevent AOF / replication */ serverLog(LL_WARNING,"Append Only File loaded by DEBUG LOADAOF"); addReply(c,shared.ok); diff --git a/tests/unit/expire.tcl b/tests/unit/expire.tcl index 62ade68f5..2b0fc22e9 100644 --- a/tests/unit/expire.tcl +++ b/tests/unit/expire.tcl @@ -603,9 +603,9 @@ start_server {tags {"expire"}} { } {-1} test {GETEX use of PERSIST option should remove TTL after loadaof} { + r config set appendonly yes r set foo bar EX 100 r getex foo PERSIST - after 2000 r debug loadaof r ttl foo } {-1} {needs:debug}