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
74fd89b3
Commit
74fd89b3
authored
Mar 26, 2014
by
antirez
Browse files
Cluster: better logging for clusterUpdateSlotsConfigWith().
parent
cf8f72c1
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/cluster.c
View file @
74fd89b3
...
@@ -1110,6 +1110,11 @@ void clusterUpdateSlotsConfigWith(clusterNode *sender, uint64_t senderConfigEpoc
...
@@ -1110,6 +1110,11 @@ void clusterUpdateSlotsConfigWith(clusterNode *sender, uint64_t senderConfigEpoc
* interested to check if slots are taken away from curmaster. */
* interested to check if slots are taken away from curmaster. */
curmaster = nodeIsMaster(myself) ? myself : myself->slaveof;
curmaster = nodeIsMaster(myself) ? myself : myself->slaveof;
if (sender == myself) {
redisLog(REDIS_WARNING,"Discarding UPDATE message about myself.");
return;
}
for (j = 0; j < REDIS_CLUSTER_SLOTS; j++) {
for (j = 0; j < REDIS_CLUSTER_SLOTS; j++) {
if (bitmapTestBit(slots,j)) {
if (bitmapTestBit(slots,j)) {
/* The slot is already bound to the sender of this message. */
/* The slot is already bound to the sender of this message. */
...
@@ -1137,9 +1142,14 @@ void clusterUpdateSlotsConfigWith(clusterNode *sender, uint64_t senderConfigEpoc
...
@@ -1137,9 +1142,14 @@ void clusterUpdateSlotsConfigWith(clusterNode *sender, uint64_t senderConfigEpoc
sender != myself)
sender != myself)
{
{
redisLog(REDIS_WARNING,
redisLog(REDIS_WARNING,
"I received a slot update for a slot I've still "
"I received an update for slot %d. "
"keys into. Putting the slot in IMPORTING state. "
"%.40s claims it with config %llu, "
"Please run the 'redis-trib fix' command.");
"I've it assigned to myself with config %llu. "
"I've still keys about this slot! "
"Putting the slot in IMPORTING state. "
"Please run the 'redis-trib fix' command.",
j, sender->name, senderConfigEpoch,
myself->configEpoch);
server.cluster->importing_slots_from[j] = sender;
server.cluster->importing_slots_from[j] = sender;
}
}
...
...
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