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
abf06fd5
Commit
abf06fd5
authored
Mar 07, 2013
by
antirez
Browse files
Cluster: log global cluster state change.
parent
3dad8196
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/cluster.c
View file @
abf06fd5
...
...
@@ -1450,7 +1450,7 @@ int clusterDelSlot(int slot) {
* Cluster state evaluation function
* -------------------------------------------------------------------------- */
void
clusterUpdateState
(
void
)
{
int
j
;
int
j
,
initial_state
=
server
.
cluster
->
state
;
/* Start assuming the state is OK. We'll turn it into FAIL if there
* are the right conditions. */
...
...
@@ -1482,6 +1482,11 @@ void clusterUpdateState(void) {
}
dictReleaseIterator
(
di
);
}
/* Log a state change */
if
(
initial_state
!=
server
.
cluster
->
state
)
redisLog
(
REDIS_WARNING
,
"Cluster state changed: %s"
,
server
.
cluster
->
state
==
REDIS_CLUSTER_OK
?
"ok"
:
"fail"
);
}
/* This function is called after the node startup in order to verify that data
...
...
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