Skip to content

Commit

Permalink
Adjust the log level of some logs in the cluster (#633)
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.

Changes:
1. Changing pfail status releated logs from VERBOSE to NOTICE.
2. Changing configEpoch collision log from VERBOSE(warning) to NOTICE.
3. Changing some logs from DEBUG to NOTICE.

Signed-off-by: Binbin <[email protected]>
Co-authored-by: Madelyn Olson <[email protected]>
  • Loading branch information
enjoy-binbin and madolson authored Jun 18, 2024
1 parent 5a51bf5 commit 495a121
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions src/cluster_legacy.c
Original file line number Diff line number Diff line change
Expand Up @@ -1761,10 +1761,8 @@ void clusterHandleConfigEpochCollision(clusterNode *sender) {
server.cluster->currentEpoch++;
myself->configEpoch = server.cluster->currentEpoch;
clusterSaveConfigOrDie(1);
serverLog(LL_VERBOSE,
"WARNING: configEpoch collision with node %.40s (%s)."
" configEpoch set to %llu",
sender->name, sender->human_nodename, (unsigned long long)myself->configEpoch);
serverLog(LL_NOTICE, "configEpoch collision with node %.40s (%s). configEpoch set to %llu", sender->name,
sender->human_nodename, (unsigned long long)myself->configEpoch);
}

/* -----------------------------------------------------------------------------
Expand Down Expand Up @@ -2100,13 +2098,13 @@ void clusterProcessGossipSection(clusterMsg *hdr, clusterLink *link) {
if (sender && clusterNodeIsVotingPrimary(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.",
sender->name, sender->human_nodename, node->name, node->human_nodename);
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 @@ -2993,7 +2991,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_NOTICE,
"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 @@ -4776,7 +4774,7 @@ void clusterCron(void) {
if (server.cluster->size == 1 && clusterNodeIsVotingPrimary(myself)) {
markNodeAsFailingIfNeeded(node);
} else {
serverLog(LL_DEBUG, "*** NODE %.40s possibly failing", node->name);
serverLog(LL_NOTICE, "NODE %.40s (%s) possibly failing.", node->name, node->human_nodename);
}
}
}
Expand Down

0 comments on commit 495a121

Please sign in to comment.