Skip to content

Commit

Permalink
server: change x-locality log from vevent to vinfo
Browse files Browse the repository at this point in the history
The X-locality log events were added in #104585 to the Node batch
receive path, to alert when localities were misconfigured. In some
clusters, especially test clusters, these events are unnecessarily
verbose in traces.

Change the log from `VEvent(5)` to `VInfo(5)` in the node batch path.

Part of: #110648
Epic: none
Release note: None
  • Loading branch information
kvoli committed Sep 29, 2023
1 parent d0c8f31 commit 5086cd7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/server/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -1385,23 +1385,23 @@ func (n *Node) getLocalityComparison(
) roachpb.LocalityComparisonType {
gossip := n.storeCfg.Gossip
if gossip == nil {
log.VEventf(ctx, 2, "gossip is not configured")
log.VInfof(ctx, 2, "gossip is not configured")
return roachpb.LocalityComparisonType_UNDEFINED
}

gatewayNodeDesc, err := gossip.GetNodeDescriptor(gatewayNodeID)
if err != nil {
log.VEventf(ctx, 2,
log.VInfof(ctx, 2,
"failed to perform look up for node descriptor %v", err)
return roachpb.LocalityComparisonType_UNDEFINED
}

comparisonResult, regionErr, zoneErr := n.Descriptor.Locality.CompareWithLocality(gatewayNodeDesc.Locality)
if regionErr != nil {
log.VEventf(ctx, 5, "unable to determine if the given nodes are cross region %v", regionErr)
log.VInfof(ctx, 5, "unable to determine if the given nodes are cross region %v", regionErr)
}
if zoneErr != nil {
log.VEventf(ctx, 5, "unable to determine if the given nodes are cross zone %v", zoneErr)
log.VInfof(ctx, 5, "unable to determine if the given nodes are cross zone %v", zoneErr)
}

return comparisonResult
Expand Down

0 comments on commit 5086cd7

Please sign in to comment.