Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
67b0b41c
Commit
67b0b41c
authored
Dec 29, 2010
by
antirez
Browse files
disk store logged messages improved
parent
ddbc81af
Changes
4
Show whitespace changes
Inline
Side-by-side
.gitignore
View file @
67b0b41c
...
...
@@ -18,3 +18,4 @@ release.h
src/transfer.sh
src/configs
src/redis-server.dSYM
redis.ds
src/diskstore.c
View file @
67b0b41c
...
...
@@ -102,7 +102,10 @@ int dsOpen(void) {
}
/* Directory already in place. Assume everything is ok. */
if
(
retval
==
0
&&
S_ISDIR
(
sb
.
st_mode
))
return
REDIS_OK
;
if
(
retval
==
0
&&
S_ISDIR
(
sb
.
st_mode
))
{
redisLog
(
REDIS_NOTICE
,
"Disk store %s exists"
,
path
);
return
REDIS_OK
;
}
/* File exists but it's not a directory */
if
(
retval
==
0
&&
!
S_ISDIR
(
sb
.
st_mode
))
{
...
...
@@ -113,6 +116,7 @@ int dsOpen(void) {
/* New disk store, create the directory structure now, as creating
* them in a lazy way is not a good idea, after very few insertions
* we'll need most of the 65536 directories anyway. */
redisLog
(
REDIS_NOTICE
,
"Disk store %s does not exist: creating"
,
path
);
if
(
mkdir
(
path
,
0755
)
==
-
1
)
{
redisLog
(
REDIS_WARNING
,
"Disk store init failed creating dir %s: %s"
,
path
,
strerror
(
errno
));
...
...
src/dscache.c
View file @
67b0b41c
...
...
@@ -117,7 +117,7 @@ void dsInit(void) {
zmalloc_enable_thread_safeness
();
/* we need thread safe zmalloc() */
redisLog
(
REDIS_NOTICE
,
"
Initializ
ing Disk Store
at
%s"
,
server
.
ds_path
);
redisLog
(
REDIS_NOTICE
,
"
Open
ing Disk Store
:
%s"
,
server
.
ds_path
);
/* Open Disk Store */
if
(
dsOpen
()
!=
REDIS_OK
)
{
redisLog
(
REDIS_WARNING
,
"Fatal error opening disk store. Exiting."
);
...
...
src/redis.c
View file @
67b0b41c
...
...
@@ -1494,7 +1494,7 @@ int main(int argc, char **argv) {
#endif
start
=
time
(
NULL
);
if
(
server
.
ds_enabled
)
{
redisLog
(
REDIS_NOTICE
,
"
R
unning with disk back end"
);
redisLog
(
REDIS_NOTICE
,
"
DB not loaded (r
unning with disk back end
)
"
);
}
else
if
(
server
.
appendonly
)
{
if
(
loadAppendOnlyFile
(
server
.
appendfilename
)
==
REDIS_OK
)
redisLog
(
REDIS_NOTICE
,
"DB loaded from append only file: %ld seconds"
,
time
(
NULL
)
-
start
);
...
...
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