From 0281a745e5d2d9921c778c3aad34bf6d80a69de0 Mon Sep 17 00:00:00 2001 From: Anas Khan <83116240+anxkhn@users.noreply.github.com> Date: Sun, 5 Jul 2026 11:40:48 +0530 Subject: [PATCH] scrape: fix bucketLimitAppender doc comments The doc comments on bucketLimitAppender and bucketLimitAppenderV2 were copied from limitAppender and never updated: they claimed to limit the number of total appended samples, but both types cap the number of buckets in native histograms, reducing the histogram resolution or returning errBucketLimit when the limit is exceeded. The bucketLimitAppenderV2 comment additionally named the wrong type (bucketLimitAppender), and the adjacent limitAppenderV2 comment named limitAppender. Correct the identifiers so each doc comment starts with the type it documents. Signed-off-by: Anas Khan <83116240+anxkhn@users.noreply.github.com> --- scrape/target.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scrape/target.go b/scrape/target.go index 3abef6ee60..afa78ca027 100644 --- a/scrape/target.go +++ b/scrape/target.go @@ -413,7 +413,7 @@ func (app *timeLimitAppender) Append(ref storage.SeriesRef, lset labels.Labels, return ref, nil } -// bucketLimitAppender limits the number of total appended samples in a batch. +// bucketLimitAppender limits the number of buckets in appended native histograms, reducing histogram resolution or returning errBucketLimit when the limit is exceeded. type bucketLimitAppender struct { storage.Appender @@ -486,7 +486,7 @@ func (app *maxSchemaAppender) AppendHistogram(ref storage.SeriesRef, lset labels return ref, nil } -// limitAppender limits the number of total appended samples in a batch. +// limitAppenderV2 limits the number of total appended samples in a batch. type limitAppenderV2 struct { storage.AppenderV2 @@ -520,7 +520,7 @@ func (app *timeLimitAppenderV2) Append(ref storage.SeriesRef, ls labels.Labels, return app.AppenderV2.Append(ref, ls, st, t, v, h, fh, opts) } -// bucketLimitAppender limits the number of total appended samples in a batch. +// bucketLimitAppenderV2 limits the number of buckets in appended native histograms, reducing histogram resolution or returning errBucketLimit when the limit is exceeded. type bucketLimitAppenderV2 struct { storage.AppenderV2