Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
e4b3c8bb
Commit
e4b3c8bb
authored
Jul 30, 2019
by
antirez
Browse files
emptyDbGeneric(): call signalFlushDb() before deleting the keys.
This was broken since a refactoring performed recently by myself.
parent
cc8125a7
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/db.c
View file @
e4b3c8bb
...
@@ -353,6 +353,11 @@ long long emptyDbGeneric(redisDb *dbarray, int dbnum, int flags, void(callback)(
...
@@ -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)(
...
@@ -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
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment