Skip to content

Commit 6f29e54

Browse files
committed
kvclient: move all log lines from Dev to kvExec
Epic: none Release note: None
1 parent 3389d85 commit 6f29e54

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

pkg/kv/kvclient/kvcoord/dist_sender.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1049,7 +1049,7 @@ func (ds *DistSender) getRoutingInfo(
10491049
containsFn = (*roachpb.RangeDescriptor).ContainsKeyInverted
10501050
}
10511051
if !containsFn(returnToken.Desc(), descKey) {
1052-
log.Dev.Fatalf(ctx, "programming error: range resolution returning non-matching descriptor: "+
1052+
log.KvExec.Fatalf(ctx, "programming error: range resolution returning non-matching descriptor: "+
10531053
"desc: %s, key: %s, reverse: %t", returnToken.Desc(), descKey, redact.Safe(useReverseScan))
10541054
}
10551055
}
@@ -1284,7 +1284,7 @@ func (ds *DistSender) Send(
12841284
if len(parts) != 1 {
12851285
panic("EndTxn not in last chunk of batch")
12861286
} else if require1PC {
1287-
log.Dev.Fatalf(ctx, "required 1PC transaction cannot be split: %s", ba)
1287+
log.KvExec.Fatalf(ctx, "required 1PC transaction cannot be split: %s", ba)
12881288
}
12891289
parts = splitBatchAndCheckForRefreshSpans(ba, true /* split ET */)
12901290
onePart = false
@@ -2228,7 +2228,7 @@ func (ds *DistSender) sendPartialBatch(
22282228
{
22292229
var s redact.StringBuilder
22302230
slowRangeRPCWarningStr(&s, ba, dur, attempts, routingTok.Desc(), err, reply)
2231-
log.Dev.Warningf(ctx, "slow range RPC: %v", &s)
2231+
log.KvExec.Warningf(ctx, "slow range RPC: %v", &s)
22322232
}
22332233
// If the RPC wasn't successful, defer the logging of a message once the
22342234
// RPC is not retried any more.
@@ -2240,7 +2240,7 @@ func (ds *DistSender) sendPartialBatch(
22402240
ds.metrics.SlowRPCs.Dec(1)
22412241
var s redact.StringBuilder
22422242
slowRangeRPCReturnWarningStr(&s, tBegin.Elapsed(), attempts)
2243-
log.Dev.Warningf(ctx, "slow RPC response: %v", &s)
2243+
log.KvExec.Warningf(ctx, "slow RPC response: %v", &s)
22442244
}(tBegin, attempts)
22452245
}
22462246
tBegin = 0 // prevent reentering branch for this RPC
@@ -2333,7 +2333,7 @@ func (ds *DistSender) sendPartialBatch(
23332333
}
23342334

23352335
if pErr == nil {
2336-
log.Dev.Fatal(ctx, "exited retry loop without an error or early exit")
2336+
log.KvExec.Fatal(ctx, "exited retry loop without an error or early exit")
23372337
}
23382338

23392339
return response{pErr: pErr}
@@ -2563,7 +2563,7 @@ func (ds *DistSender) sendToReplicas(
25632563
case kvpb.RoutingPolicy_NEAREST:
25642564
replicaFilter = AllExtantReplicas
25652565
default:
2566-
log.Dev.Fatalf(ctx, "unknown routing policy: %s", ba.RoutingPolicy)
2566+
log.KvExec.Fatalf(ctx, "unknown routing policy: %s", ba.RoutingPolicy)
25672567
}
25682568
desc := routing.Desc()
25692569
replicas, err := NewReplicaSlice(ctx, ds.nodeDescs, desc, routing.Leaseholder(), replicaFilter)
@@ -2603,7 +2603,7 @@ func (ds *DistSender) sendToReplicas(
26032603
log.VEventf(ctx, 2, "routing to nearest replica; leaseholder not required order=%v", replicas)
26042604

26052605
default:
2606-
log.Dev.Fatalf(ctx, "unknown routing policy: %s", ba.RoutingPolicy)
2606+
log.KvExec.Fatalf(ctx, "unknown routing policy: %s", ba.RoutingPolicy)
26072607
}
26082608

26092609
// NB: upgrade the connection class to SYSTEM, for critical ranges. Set it to
@@ -2737,7 +2737,7 @@ func (ds *DistSender) sendToReplicas(
27372737
} else if routing.Leaseholder() == nil {
27382738
// NB: Normally we don't have both routeToLeaseholder and a nil
27392739
// leaseholder. This could be changed to an assertion.
2740-
log.Dev.Errorf(ctx, "attempting %v to route to leaseholder, but the leaseholder is unknown %v", ba, routing)
2740+
log.KvExec.Errorf(ctx, "attempting %v to route to leaseholder, but the leaseholder is unknown %v", ba, routing)
27412741
} else if ba.Replica.NodeID == routing.Leaseholder().NodeID {
27422742
// We are sending this request to the leaseholder, so it doesn't
27432743
// make sense to attempt to proxy it.
@@ -2780,7 +2780,7 @@ func (ds *DistSender) sendToReplicas(
27802780
if admissionpb.WorkPriority(ba.AdmissionHeader.Priority) >= admissionpb.NormalPri {
27812781
// Note that these RPC may or may not have succeeded. Errors are counted separately below.
27822782
ds.metrics.SlowReplicaRPCs.Inc(1)
2783-
log.Dev.Warningf(ctx, "slow replica RPC: %v", &s)
2783+
log.KvExec.Warningf(ctx, "slow replica RPC: %v", &s)
27842784
} else {
27852785
log.Eventf(ctx, "slow replica RPC: %v", &s)
27862786
}

0 commit comments

Comments
 (0)