Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions pkg/ccl/changefeedccl/changefeed_processors.go
Original file line number Diff line number Diff line change
Expand Up @@ -2252,7 +2252,7 @@ func frontierIsBehind(frontier hlc.Timestamp, sv *settings.Values) bool {
// frontier is behind
func maybeLogBehindSpan(
ctx context.Context,
description string,
description redact.SafeString,
frontier span.Frontier,
frontierChanged bool,
sv *settings.Values,
Expand All @@ -2272,12 +2272,12 @@ func maybeLogBehindSpan(

if frontierChanged && slowLogEveryN.ShouldProcess(now) {
log.Changefeed.Infof(ctx, "%s new resolved timestamp %s is behind by %s",
redact.Safe(description), frontierTS, resolvedBehind)
description, frontierTS, resolvedBehind)
}

if slowLogEveryN.ShouldProcess(now) {
s := frontier.PeekFrontierSpan()
log.Changefeed.Infof(ctx, "%s span %s is behind by %s", redact.Safe(description), s, resolvedBehind)
log.Changefeed.Infof(ctx, "%s span %s is behind by %s", description, s, resolvedBehind)
}
}

Expand Down
1 change: 0 additions & 1 deletion pkg/ccl/changefeedccl/kvevent/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ go_library(
"//pkg/util/timeutil",
"@com_github_cockroachdb_crlib//crtime",
"@com_github_cockroachdb_errors//:errors",
"@com_github_cockroachdb_redact//:redact",
],
)

Expand Down
7 changes: 2 additions & 5 deletions pkg/ccl/changefeedccl/kvevent/blocking_buffer.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import (
"github.com/cockroachdb/cockroach/pkg/util/timeutil"
"github.com/cockroachdb/crlib/crtime"
"github.com/cockroachdb/errors"
"github.com/cockroachdb/redact"
)

// blockingBuffer is an implementation of Buffer which allocates memory
Expand Down Expand Up @@ -524,15 +523,13 @@ func logSlowAcquisition(
shouldLog := logSlowAcquire.ShouldLog()
if shouldLog {
log.Changefeed.Warningf(ctx, "have been waiting %s attempting to acquire changefeed quota (buffer=%s)",
timeutil.Since(start),
redact.SafeString(bufType))
timeutil.Since(start), bufType)
}

return func() {
if shouldLog {
log.Changefeed.Infof(ctx, "acquired changefeed quota after %s (buffer=%s)",
timeutil.Since(start),
redact.SafeString(bufType))
timeutil.Since(start), bufType)
}
}
}
Expand Down
3 changes: 3 additions & 0 deletions pkg/ccl/changefeedccl/kvevent/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,9 @@ func (bt bufferType) alterMeta(meta metric.Metadata) metric.Metadata {
return meta
}

// SafeValue implements redact.SafeValue.
func (bt bufferType) SafeValue() {}

// MakeMetrics constructs a Metrics struct with the provided histogram window.
func MakeMetrics(histogramWindow time.Duration) Metrics {
eventTypeMeta := func(et Type) metric.Metadata {
Expand Down
3 changes: 3 additions & 0 deletions pkg/testutils/lint/passes/redactcheck/redactcheck.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ func runAnalyzer(pass *analysis.Pass) (interface{}, error) {
"SettingName": {},
"ValueOrigin": {},
},
"github.com/cockroachdb/cockroach/pkg/ccl/changefeedccl/kvevent": {
"bufferType": {},
},
"github.com/cockroachdb/cockroach/pkg/crosscluster/logical": {
"processorType": {},
},
Expand Down
Loading