X-Git-Url: https://git.saurik.com/redis.git/blobdiff_plain/ab52d1f4a8f3173622e0758d6f82f1aff0812b93..c0875a77a14d417f76b4419127733929ace587ee:/src/redis.c diff --git a/src/redis.c b/src/redis.c index 83aa3a82..dd693f6c 100644 --- a/src/redis.c +++ b/src/redis.c @@ -1802,8 +1802,13 @@ int main(int argc, char **argv) { if (loadAppendOnlyFile(server.appendfilename) == REDIS_OK) redisLog(REDIS_NOTICE,"DB loaded from append only file: %.3f seconds",(float)(ustime()-start)/1000000); } else { - if (rdbLoad(server.dbfilename) == REDIS_OK) - redisLog(REDIS_NOTICE,"DB loaded from disk: %.3f seconds",(float)(ustime()-start)/1000000); + if (rdbLoad(server.dbfilename) == REDIS_OK) { + redisLog(REDIS_NOTICE,"DB loaded from disk: %.3f seconds", + (float)(ustime()-start)/1000000); + } else if (errno != ENOENT) { + redisLog(REDIS_WARNING,"Fatal error loading the DB. Exiting."); + exit(1); + } } if (server.ipfd > 0) redisLog(REDIS_NOTICE,"The server is now ready to accept connections on port %d", server.port);