diff --git a/pkg/ccl/changefeedccl/changefeed_processors.go b/pkg/ccl/changefeedccl/changefeed_processors.go index 43ffe2ba38a3..504dde57ca92 100644 --- a/pkg/ccl/changefeedccl/changefeed_processors.go +++ b/pkg/ccl/changefeedccl/changefeed_processors.go @@ -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, @@ -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) } } diff --git a/pkg/ccl/changefeedccl/kvevent/BUILD.bazel b/pkg/ccl/changefeedccl/kvevent/BUILD.bazel index 34ea5236dab3..e4e72b7e933a 100644 --- a/pkg/ccl/changefeedccl/kvevent/BUILD.bazel +++ b/pkg/ccl/changefeedccl/kvevent/BUILD.bazel @@ -30,7 +30,6 @@ go_library( "//pkg/util/timeutil", "@com_github_cockroachdb_crlib//crtime", "@com_github_cockroachdb_errors//:errors", - "@com_github_cockroachdb_redact//:redact", ], ) diff --git a/pkg/ccl/changefeedccl/kvevent/blocking_buffer.go b/pkg/ccl/changefeedccl/kvevent/blocking_buffer.go index eb1fcf4b0a56..a14e3971b6e0 100644 --- a/pkg/ccl/changefeedccl/kvevent/blocking_buffer.go +++ b/pkg/ccl/changefeedccl/kvevent/blocking_buffer.go @@ -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 @@ -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) } } } diff --git a/pkg/ccl/changefeedccl/kvevent/metrics.go b/pkg/ccl/changefeedccl/kvevent/metrics.go index f16dcfb88f1b..f7c9610db00a 100644 --- a/pkg/ccl/changefeedccl/kvevent/metrics.go +++ b/pkg/ccl/changefeedccl/kvevent/metrics.go @@ -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 { diff --git a/pkg/testutils/lint/passes/redactcheck/redactcheck.go b/pkg/testutils/lint/passes/redactcheck/redactcheck.go index 0699e6e78d78..01190da5d37e 100644 --- a/pkg/testutils/lint/passes/redactcheck/redactcheck.go +++ b/pkg/testutils/lint/passes/redactcheck/redactcheck.go @@ -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": {}, },