From db69845b486f214d1413da75f23a80778e12533c Mon Sep 17 00:00:00 2001 From: antirez Date: Thu, 18 Jul 2019 12:37:55 +0200 Subject: [PATCH] RDB: update rdbLoadRio comment about EOF condition. --- src/rdb.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/rdb.c b/src/rdb.c index ac9973385..e8d175ca2 100644 --- a/src/rdb.c +++ b/src/rdb.c @@ -2169,8 +2169,13 @@ int rdbLoadRio(rio *rdb, rdbSaveInfo *rsi, int loading_aof) { } return C_OK; -eoferr: /* unexpected end of file is handled here with a fatal exit */ - serverLog(LL_WARNING,"Short read or OOM loading DB. Unrecoverable error, aborting now."); + /* Unexpected end of file is handled here calling rdbReportReadError(): + * this will in turn either abort Redis in most cases, or if we are loading + * the RDB file from a socket during initial SYNC (diskless replica mode), + * we'll report the error to the caller, so that we can retry. */ +eoferr: + serverLog(LL_WARNING, + "Short read or OOM loading DB. Unrecoverable error, aborting now."); rdbReportReadError("Unexpected EOF reading RDB file"); return C_ERR; }