Skip to content

Commit

Permalink
Merge #55517
Browse files Browse the repository at this point in the history
55517: kv: properly format uses of redact.StringBuilder r=nvanbenschoten a=nvanbenschoten

This was causing the logs to be useless, as we saw in #54570.

Co-authored-by: Nathan VanBenschoten <[email protected]>
  • Loading branch information
craig[bot] and nvanbenschoten committed Oct 15, 2020
2 parents 80e7127 + 7532d2c commit 00d70ee
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions pkg/kv/kvclient/kvcoord/dist_sender.go
Original file line number Diff line number Diff line change
Expand Up @@ -1499,7 +1499,7 @@ func (ds *DistSender) sendPartialBatch(
{
var s redact.StringBuilder
slowRangeRPCWarningStr(&s, ba, dur, attempts, routingTok.Desc(), err, reply)
log.Warningf(ctx, "slow range RPC: %v", s)
log.Warningf(ctx, "slow range RPC: %v", &s)
}
// If the RPC wasn't successful, defer the logging of a message once the
// RPC is not retried any more.
Expand All @@ -1509,7 +1509,7 @@ func (ds *DistSender) sendPartialBatch(
ds.metrics.SlowRPCs.Dec(1)
var s redact.StringBuilder
slowRangeRPCReturnWarningStr(&s, timeutil.Since(tBegin), attempts)
log.Warningf(ctx, "slow RPC response: %v", s)
log.Warningf(ctx, "slow RPC response: %v", &s)
}(tBegin, attempts)
}
tBegin = time.Time{} // prevent reentering branch for this RPC
Expand Down
2 changes: 1 addition & 1 deletion pkg/kv/kvserver/replica_consistency.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ func (r *Replica) CheckConsistency(
}

if isQueue {
log.Errorf(ctx, "%v", buf.RedactableString())
log.Errorf(ctx, "%v", &buf)
}
res.Detail += buf.String()
} else {
Expand Down

0 comments on commit 00d70ee

Please sign in to comment.