From d2bd33825d39d4e632e63d56b57e2079cc01fb1f Mon Sep 17 00:00:00 2001 From: Marco Pracucci Date: Tue, 2 Jul 2024 15:38:24 +0200 Subject: [PATCH] Renamed loggerWithCurrentLag() to loggerWithCurrentLagIfSet() Signed-off-by: Marco Pracucci --- pkg/storage/ingest/reader.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/storage/ingest/reader.go b/pkg/storage/ingest/reader.go index 678f13127c3..86ca6164bde 100644 --- a/pkg/storage/ingest/reader.go +++ b/pkg/storage/ingest/reader.go @@ -289,7 +289,7 @@ func (r *PartitionReader) processNextFetchesUntilLagHonored(ctx context.Context, // This message is NOT expected to be logged with a very high rate. In this log we display the last measured // lag. If we don't have it (lag is zero value), then it will not be logged. - level.Info(loggerWithCurrentLag(logger, currLag)).Log("msg", "partition reader is consuming records to honor target and max consumer lag", "partition_start_offset", partitionStartOffset, "last_produced_offset", lastProducedOffset) + level.Info(loggerWithCurrentLagIfSet(logger, currLag)).Log("msg", "partition reader is consuming records to honor target and max consumer lag", "partition_start_offset", partitionStartOffset, "last_produced_offset", lastProducedOffset) for boff.Ongoing() { // Continue reading until we reached the desired offset. @@ -347,7 +347,7 @@ func isErrFetch(fetch kgo.Fetch) bool { return false } -func loggerWithCurrentLag(logger log.Logger, currLag time.Duration) log.Logger { +func loggerWithCurrentLagIfSet(logger log.Logger, currLag time.Duration) log.Logger { if currLag <= 0 { return logger }