mirror of
https://github.com/fluencelabs/redis
synced 2025-06-23 14:01:34 +00:00
test adapted to run with diskstore, and a few bugs fixed
This commit is contained in:
4
src/db.c
4
src/db.c
@ -201,7 +201,8 @@ int dbDelete(redisDb *db, robj *key) {
|
||||
return dictDelete(db->dict,key->ptr) == DICT_OK;
|
||||
}
|
||||
|
||||
/* Empty the whole database */
|
||||
/* Empty the whole database.
|
||||
* If diskstore is enabled this function will just flush the in-memory cache. */
|
||||
long long emptyDb() {
|
||||
int j;
|
||||
long long removed = 0;
|
||||
@ -210,6 +211,7 @@ long long emptyDb() {
|
||||
removed += dictSize(server.db[j].dict);
|
||||
dictEmpty(server.db[j].dict);
|
||||
dictEmpty(server.db[j].expires);
|
||||
if (server.ds_enabled) dictEmpty(server.db[j].io_negcache);
|
||||
}
|
||||
return removed;
|
||||
}
|
||||
|
Reference in New Issue
Block a user