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
2ecb5edf
Commit
2ecb5edf
authored
Mar 20, 2015
by
antirez
Browse files
Cluster: move clusterBeforeSleep() call before unblocked clients processing.
Related to issue #2288.
parent
438a1a84
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/redis.c
View file @
2ecb5edf
...
...
@@ -1260,6 +1260,12 @@ int serverCron(struct aeEventLoop *eventLoop, long long id, void *clientData) {
void
beforeSleep
(
struct
aeEventLoop
*
eventLoop
)
{
REDIS_NOTUSED
(
eventLoop
);
/* Call the Redis Cluster before sleep function. Note that this function
* may change the state of Redis Cluster (frok ok to fail or vice versa),
* so it's a good idea to call it before serving the unblocked clients
* later in this function. */
if
(
server
.
cluster_enabled
)
clusterBeforeSleep
();
/* Run a fast expire cycle (the called function will return
* ASAP if a fast cycle is not needed). */
if
(
server
.
active_expire_enabled
&&
server
.
masterhost
==
NULL
)
...
...
@@ -1291,9 +1297,6 @@ void beforeSleep(struct aeEventLoop *eventLoop) {
/* Write the AOF buffer on disk */
flushAppendOnlyFile
(
0
);
/* Call the Redis Cluster before sleep function. */
if
(
server
.
cluster_enabled
)
clusterBeforeSleep
();
}
/* =========================== Server initialization ======================== */
...
...
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