automatic AOF rewrite first implementation. Still to be tested.

This commit is contained in:
antirez
2011-06-10 12:39:23 +02:00
parent 936c4ab64b
commit b333e23997
6 changed files with 97 additions and 8 deletions

View File

@ -1039,6 +1039,9 @@ void bgsaveCommand(redisClient *c) {
if (server.bgsavechildpid != -1 || server.bgsavethread != (pthread_t)-1) {
addReplyError(c,"Background save already in progress");
return;
} else if (server.bgrewritechildpid != -1) {
addReplyError(c,"Can't BGSAVE while AOF log rewriting is in progress");
return;
}
if (rdbSaveBackground(server.dbfilename) == REDIS_OK) {
addReplyStatus(c,"Background saving started");