Lazyfree: ability to free whole DBs in background.

This commit is contained in:
antirez
2015-09-28 10:47:45 +02:00
parent b08c36c5f2
commit c69c6c80fb
7 changed files with 108 additions and 16 deletions

View File

@ -271,7 +271,7 @@ void debugCommand(client *c) {
addReply(c,shared.err);
return;
}
emptyDb(NULL);
emptyDb(-1,EMPTYDB_NO_FLAGS,NULL);
if (rdbLoad(server.rdb_filename) != C_OK) {
addReplyError(c,"Error trying to load the RDB dump");
return;
@ -279,7 +279,7 @@ void debugCommand(client *c) {
serverLog(LL_WARNING,"DB reloaded by DEBUG RELOAD");
addReply(c,shared.ok);
} else if (!strcasecmp(c->argv[1]->ptr,"loadaof")) {
emptyDb(NULL);
emptyDb(-1,EMPTYDB_NO_FLAGS,NULL);
if (loadAppendOnlyFile(server.aof_filename) != C_OK) {
addReply(c,shared.err);
return;