Skip to content

Commit

Permalink
Adjust the log level of some logs in the cluster
Browse files Browse the repository at this point in the history
I think the log of pfail status changes will be very useful.
The other parts were scanned and found that it can be modified.

Signed-off-by: Binbin <binloveplay1314@qq.com>
  • Loading branch information
enjoy-binbin committed Jun 12, 2024
1 parent e65b2d2 commit 3c047bb
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/cluster_legacy.c
Original file line number Diff line number Diff line change
Expand Up @@ -1755,7 +1755,7 @@ void clusterHandleConfigEpochCollision(clusterNode *sender) {
server.cluster->currentEpoch++;
myself->configEpoch = server.cluster->currentEpoch;
clusterSaveConfigOrDie(1);
serverLog(LL_VERBOSE,
serverLog(LL_WARNING,
"WARNING: configEpoch collision with node %.40s (%s)."
" configEpoch set to %llu",
sender->name, sender->human_nodename, (unsigned long long)myself->configEpoch);
Expand Down Expand Up @@ -2094,13 +2094,13 @@ void clusterProcessGossipSection(clusterMsg *hdr, clusterLink *link) {
if (sender && clusterNodeIsPrimary(sender)) {
if (flags & (CLUSTER_NODE_FAIL | CLUSTER_NODE_PFAIL)) {
if (clusterNodeAddFailureReport(node, sender)) {
serverLog(LL_VERBOSE, "Node %.40s (%s) reported node %.40s (%s) as not reachable.",
serverLog(LL_NOTICE, "Node %.40s (%s) reported node %.40s (%s) as not reachable.",
sender->name, sender->human_nodename, node->name, node->human_nodename);
}
markNodeAsFailingIfNeeded(node);
} else {
if (clusterNodeDelFailureReport(node, sender)) {
serverLog(LL_VERBOSE, "Node %.40s (%s) reported node %.40s (%s) is back online.", sender->name,
serverLog(LL_NOTICE, "Node %.40s (%s) reported node %.40s (%s) is back online.", sender->name,
sender->human_nodename, node->name, node->human_nodename);
}
}
Expand Down Expand Up @@ -2971,7 +2971,7 @@ int clusterProcessPacket(clusterLink *link) {
/* If the reply has a non matching node ID we
* disconnect this node and set it as not having an associated
* address. */
serverLog(LL_DEBUG,
serverLog(LL_WARNING,
"PONG contains mismatching sender ID. About node %.40s (%s) in shard %.40s added %d ms ago, "
"having flags %d",
link->node->name, link->node->human_nodename, link->node->shard_id,
Expand Down Expand Up @@ -3196,7 +3196,7 @@ int clusterProcessPacket(clusterLink *link) {
if (bitmapTestBit(hdr->myslots, j)) {
if (server.cluster->slots[j] == sender || isSlotUnclaimed(j)) continue;
if (server.cluster->slots[j]->configEpoch > senderConfigEpoch) {
serverLog(LL_VERBOSE,
serverLog(LL_NOTICE,
"Node %.40s has old slots configuration, sending "
"an UPDATE message about %.40s",
sender->name, server.cluster->slots[j]->name);
Expand Down Expand Up @@ -4782,7 +4782,7 @@ void clusterCron(void) {
if (clusterNodeIsPrimary(myself) && server.cluster->size == 1) {
markNodeAsFailingIfNeeded(node);
} else {
serverLog(LL_DEBUG, "*** NODE %.40s possibly failing", node->name);
serverLog(LL_NOTICE, "NODE %.40s possibly failing.", node->name);
}
}
}
Expand Down

0 comments on commit 3c047bb

Please sign in to comment.