mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-23 00:28:26 -05:00
emptyDbGeneric(): call signalFlushDb() before deleting the keys.
This was broken since a refactoring performed recently by myself.
This commit is contained in:
parent
cc8125a779
commit
e4b3c8bbc3
6
src/db.c
6
src/db.c
@ -353,6 +353,11 @@ long long emptyDbGeneric(redisDb *dbarray, int dbnum, int flags, void(callback)(
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Make sure the WATCHed keys are affected by the FLUSH* commands.
|
||||||
|
* Note that we need to call the function while the keys are still
|
||||||
|
* there. */
|
||||||
|
signalFlushedDb(dbnum);
|
||||||
|
|
||||||
int startdb, enddb;
|
int startdb, enddb;
|
||||||
if (dbnum == -1) {
|
if (dbnum == -1) {
|
||||||
startdb = 0;
|
startdb = 0;
|
||||||
@ -378,7 +383,6 @@ long long emptyDbGeneric(redisDb *dbarray, int dbnum, int flags, void(callback)(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (dbnum == -1) flushSlaveKeysWithExpireList();
|
if (dbnum == -1) flushSlaveKeysWithExpireList();
|
||||||
signalFlushedDb(dbnum);
|
|
||||||
return removed;
|
return removed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user