Skip to content

Commit

Permalink
backupccl: decrease log chattiness
Browse files Browse the repository at this point in the history
The "sending ExportRequest for span" log message was the 5th most
voluminous log event source in CC.

This commit makes it less verbose, by importing a one-line change from
another merged PR cockroachdb#84043 from v22.2.

Release note: None
  • Loading branch information
knz committed Sep 30, 2022
1 parent a87b3d0 commit cb03e0a
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions pkg/ccl/backupccl/backup_processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,8 @@ func runBackupProcessor(
// *2). See #49798.
numSenders := int(kvserver.ExportRequestsLimit.Get(&clusterSettings.SV)) * 2

logExport := log.Every(10 * time.Second)

return ctxgroup.GroupWorkers(ctx, numSenders, func(ctx context.Context, _ int) error {
readTime := spec.BackupEndTime.GoTime()

Expand Down Expand Up @@ -415,8 +417,13 @@ func runBackupProcessor(
Source: roachpb.AdmissionHeader_FROM_SQL,
NoMemoryReservedAtSource: true,
}
log.Infof(ctx, "sending ExportRequest for span %s (attempt %d, priority %s)",
span.span, span.attempts+1, header.UserPriority.String())
if span.attempts > 0 || logExport.ShouldLog() {
log.Infof(ctx, "sending ExportRequest for span %s (attempt %d, priority %s)",
span.span, span.attempts+1, header.UserPriority.String())
} else {
log.VEventf(ctx, 1, "sending ExportRequest for span %s (attempt %d, priority %s)",
span.span, span.attempts+1, header.UserPriority.String())
}
var rawRes roachpb.Response
var pErr *roachpb.Error
var reqSentTime time.Time
Expand Down

0 comments on commit cb03e0a

Please sign in to comment.