-
Notifications
You must be signed in to change notification settings - Fork 4.1k
kvserver: stop printing locality-mismatch error in traces #110648
Copy link
Copy link
Closed
Labels
A-kv-distributionRelating to rebalancing and leasing.Relating to rebalancing and leasing.C-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)O-premortemIssues identified during premortem exercise.Issues identified during premortem exercise.T-kvKV TeamKV Team
Description
Is your feature request related to a problem? Please describe.
We added X-(region|zone) metrics for batch request/responses between the DistSender (#103963) and Node (#104585). These log VEventf(2|5) in various places:
Lines 1396 to 1415 in 542b506
| if gossip == nil { | |
| log.VEventf(ctx, 2, "gossip is not configured") | |
| return roachpb.LocalityComparisonType_UNDEFINED | |
| } | |
| gatewayNodeDesc, err := gossip.GetNodeDescriptor(gatewayNodeID) | |
| if err != nil { | |
| log.VEventf(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) | |
| } | |
| if zoneErr != nil { | |
| log.VEventf(ctx, 5, "unable to determine if the given nodes are cross zone %v", zoneErr) | |
| } | |
cockroach/pkg/kv/kvclient/kvcoord/dist_sender.go
Lines 2656 to 2660 in 542b506
| log.VEventf(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) | |
| } |
Describe the solution you'd like
Change these to be a log.Every..., and VInfo, so that these do not show up on traces.
Jira issue: CRDB-31544
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-kv-distributionRelating to rebalancing and leasing.Relating to rebalancing and leasing.C-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)O-premortemIssues identified during premortem exercise.Issues identified during premortem exercise.T-kvKV TeamKV Team