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
d8a717fb
Commit
d8a717fb
authored
Sep 30, 2010
by
Robey Pointer
Committed by
antirez
Oct 22, 2010
Browse files
if server.saveparamslen is not set, don't save the DB on exit.
parent
fc413451
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/redis.c
View file @
d8a717fb
...
@@ -1093,7 +1093,7 @@ int prepareForShutdown() {
...
@@ -1093,7 +1093,7 @@ int prepareForShutdown() {
/* Append only file: fsync() the AOF and exit */
/* Append only file: fsync() the AOF and exit */
aof_fsync
(
server
.
appendfd
);
aof_fsync
(
server
.
appendfd
);
if
(
server
.
vm_enabled
)
unlink
(
server
.
vm_swap_file
);
if
(
server
.
vm_enabled
)
unlink
(
server
.
vm_swap_file
);
}
else
{
}
else
if
(
server
.
saveparamslen
>
0
)
{
/* Snapshotting. Perform a SYNC SAVE and exit */
/* Snapshotting. Perform a SYNC SAVE and exit */
if
(
rdbSave
(
server
.
dbfilename
)
!=
REDIS_OK
)
{
if
(
rdbSave
(
server
.
dbfilename
)
!=
REDIS_OK
)
{
/* Ooops.. error saving! The best we can do is to continue
/* Ooops.. error saving! The best we can do is to continue
...
@@ -1104,6 +1104,8 @@ int prepareForShutdown() {
...
@@ -1104,6 +1104,8 @@ int prepareForShutdown() {
redisLog
(
REDIS_WARNING
,
"Error trying to save the DB, can't exit"
);
redisLog
(
REDIS_WARNING
,
"Error trying to save the DB, can't exit"
);
return
REDIS_ERR
;
return
REDIS_ERR
;
}
}
}
else
{
redisLog
(
REDIS_WARNING
,
"Not saving DB."
);
}
}
if
(
server
.
daemonize
)
unlink
(
server
.
pidfile
);
if
(
server
.
daemonize
)
unlink
(
server
.
pidfile
);
redisLog
(
REDIS_WARNING
,
"Server exit now, bye bye..."
);
redisLog
(
REDIS_WARNING
,
"Server exit now, bye bye..."
);
...
...
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