Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
9925c7c6
Commit
9925c7c6
authored
Mar 12, 2013
by
Salvatore Sanfilippo
Browse files
Merge pull request #1001 from djanowski/fatal-errors-rdb-load
Abort when opening the RDB file results in an error other than ENOENT.
parents
215bfaea
4178a802
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/rdb.c
View file @
9925c7c6
...
...
@@ -1069,7 +1069,6 @@ int rdbLoad(char *filename) {
fp
=
fopen
(
filename
,
"r"
);
if
(
!
fp
)
{
errno
=
ENOENT
;
return
REDIS_ERR
;
}
rioInitWithFile
(
&
rdb
,
fp
);
...
...
src/redis.c
View file @
9925c7c6
...
...
@@ -2736,7 +2736,7 @@ void loadDataFromDisk(void) {
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."
);
redisLog(REDIS_WARNING,"Fatal error loading the DB
: %s
. Exiting."
,strerror(errno)
);
exit(1);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment