mirror of
https://github.com/fluencelabs/redis
synced 2025-04-22 17:12:13 +00:00
if server.saveparamslen is not set, don't save the DB on exit.
This commit is contained in:
parent
fc41345116
commit
d8a717fb1a
@ -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() {
|
|||||||
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...");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user