diff options
author | antirez <antirez@gmail.com> | 2019-07-30 11:20:51 +0200 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2019-07-30 11:20:54 +0200 |
commit | e4b3c8bbc3d01176dee434a6ae8e8e10bb74703a (patch) | |
tree | 2e2d078de3618ed25623c2d8a1763bd80909304d /src/db.c | |
parent | cc8125a779ad534571bac5904350cf409f09c467 (diff) | |
download | redis-e4b3c8bbc3d01176dee434a6ae8e8e10bb74703a.tar.gz |
emptyDbGeneric(): call signalFlushDb() before deleting the keys.
This was broken since a refactoring performed recently by myself.
Diffstat (limited to 'src/db.c')
-rw-r--r-- | src/db.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -353,6 +353,11 @@ long long emptyDbGeneric(redisDb *dbarray, int dbnum, int flags, void(callback)( 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; if (dbnum == -1) { startdb = 0; @@ -378,7 +383,6 @@ long long emptyDbGeneric(redisDb *dbarray, int dbnum, int flags, void(callback)( } } if (dbnum == -1) flushSlaveKeysWithExpireList(); - signalFlushedDb(dbnum); return removed; } |