mirror of
https://github.com/fluencelabs/redis
synced 2025-06-18 11:41:20 +00:00
dict.c: added optional callback to dictEmpty().
Redis hash table implementation has many non-blocking features like incremental rehashing, however while deleting a large hash table there was no way to have a callback called to do some incremental work. This commit adds this support, as an optiona callback argument to dictEmpty() that is currently called at a fixed interval (one time every 65k deletions).
This commit is contained in:
@ -261,7 +261,7 @@ void debugCommand(redisClient *c) {
|
||||
addReply(c,shared.err);
|
||||
return;
|
||||
}
|
||||
emptyDb();
|
||||
emptyDb(NULL);
|
||||
if (rdbLoad(server.rdb_filename) != REDIS_OK) {
|
||||
addReplyError(c,"Error trying to load the RDB dump");
|
||||
return;
|
||||
@ -269,7 +269,7 @@ void debugCommand(redisClient *c) {
|
||||
redisLog(REDIS_WARNING,"DB reloaded by DEBUG RELOAD");
|
||||
addReply(c,shared.ok);
|
||||
} else if (!strcasecmp(c->argv[1]->ptr,"loadaof")) {
|
||||
emptyDb();
|
||||
emptyDb(NULL);
|
||||
if (loadAppendOnlyFile(server.aof_filename) != REDIS_OK) {
|
||||
addReply(c,shared.err);
|
||||
return;
|
||||
|
Reference in New Issue
Block a user