summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/aof.c3
-rw-r--r--src/debug.c2
-rw-r--r--src/rdb.c9
-rw-r--r--src/replication.c4
-rw-r--r--src/server.c2
5 files changed, 10 insertions, 10 deletions
diff --git a/src/aof.c b/src/aof.c
index 482ec786d..1f0b824f1 100644
--- a/src/aof.c
+++ b/src/aof.c
@@ -1432,7 +1432,8 @@ int loadSingleAppendOnlyFile(char *filename) {
else
serverLog(LL_WARNING, "Error reading the RDB base file %s, AOF loading aborted", filename);
- goto readerr;
+ ret = AOF_FAILED;
+ goto cleanup;
} else {
loadingAbsProgress(ftello(fp));
last_progress_report_size = ftello(fp);
diff --git a/src/debug.c b/src/debug.c
index 33e4a9ac3..dac7716ac 100644
--- a/src/debug.c
+++ b/src/debug.c
@@ -568,7 +568,7 @@ NULL
int ret = rdbLoad(server.rdb_filename,NULL,flags);
unprotectClient(c);
if (ret != RDB_OK) {
- addReplyError(c,"Error trying to load the RDB dump");
+ addReplyError(c,"Error trying to load the RDB dump, check server logs.");
return;
}
serverLog(LL_WARNING,"DB reloaded by DEBUG RELOAD");
diff --git a/src/rdb.c b/src/rdb.c
index fea5f4121..993a123c0 100644
--- a/src/rdb.c
+++ b/src/rdb.c
@@ -2889,7 +2889,7 @@ int rdbLoadRio(rio *rdb, int rdbflags, rdbSaveInfo *rsi) {
/* Load an RDB file from the rio stream 'rdb'. On success C_OK is returned,
- * otherwise C_ERR is returned and 'errno' is set accordingly.
+ * otherwise C_ERR is returned.
* The rdb_loading_ctx argument holds objects to which the rdb will be loaded to,
* currently it only allow to set db object and functionLibCtx to which the data
* will be loaded (in the future it might contains more such objects). */
@@ -2907,13 +2907,11 @@ int rdbLoadRioWithLoadingCtx(rio *rdb, int rdbflags, rdbSaveInfo *rsi, rdbLoadin
buf[9] = '\0';
if (memcmp(buf,"REDIS",5) != 0) {
serverLog(LL_WARNING,"Wrong signature trying to load DB from file");
- errno = EINVAL;
return C_ERR;
}
rdbver = atoi(buf+5);
if (rdbver < 1 || rdbver > RDB_VERSION) {
serverLog(LL_WARNING,"Can't handle RDB format version %d",rdbver);
- errno = EINVAL;
return C_ERR;
}
@@ -3254,9 +3252,10 @@ int rdbLoad(char *filename, rdbSaveInfo *rsi, int rdbflags) {
fp = fopen(filename, "r");
if (fp == NULL) {
- retval = (errno == ENOENT) ? RDB_NOT_EXIST : RDB_FAILED;
+ if (errno == ENOENT) return RDB_NOT_EXIST;
+
serverLog(LL_WARNING,"Fatal error: can't open the RDB file %s for reading: %s", filename, strerror(errno));
- return retval;
+ return RDB_FAILED;
}
if (fstat(fileno(fp), &sb) == -1)
diff --git a/src/replication.c b/src/replication.c
index 65ae27069..faf159d7d 100644
--- a/src/replication.c
+++ b/src/replication.c
@@ -2055,7 +2055,7 @@ void readSyncBulkPayload(connection *conn) {
/* RDB loading failed. */
serverLog(LL_WARNING,
"Failed trying to load the MASTER synchronization DB "
- "from socket: %s", strerror(errno));
+ "from socket, check server logs.");
loadingFailed = 1;
} else if (usemark) {
/* Verify the end mark is correct. */
@@ -2164,7 +2164,7 @@ void readSyncBulkPayload(connection *conn) {
if (rdbLoad(server.rdb_filename,&rsi,RDBFLAGS_REPLICATION) != RDB_OK) {
serverLog(LL_WARNING,
"Failed trying to load the MASTER synchronization "
- "DB from disk: %s", strerror(errno));
+ "DB from disk, check server logs.");
cancelReplicationHandshake(1);
if (server.rdb_del_sync_files && allPersistenceDisabled()) {
serverLog(LL_NOTICE,"Removing the RDB file obtained from "
diff --git a/src/server.c b/src/server.c
index 27f2be905..43f016ee2 100644
--- a/src/server.c
+++ b/src/server.c
@@ -6551,7 +6551,7 @@ void loadDataFromDisk(void) {
}
}
} else if (rdb_load_ret != RDB_NOT_EXIST) {
- serverLog(LL_WARNING,"Fatal error loading the DB: %s. Exiting.",strerror(errno));
+ serverLog(LL_WARNING, "Fatal error loading the DB, check server logs. Exiting.");
exit(1);
}