Skip to content

Commit 10f767d

Browse files
knyarStevenYCChou
authored andcommitted
Fix comment for updateSampleInterval. (#112)
The function actually returns 'false' if it failed, in which case we do discard the sample in sampleBuilder.next().
1 parent 3c176b3 commit 10f767d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

retrieval/series_cache.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ type seriesGetter interface {
6565
getResetAdjusted(ref uint64, t int64, v float64) (int64, float64, bool)
6666

6767
// Attempt to set the new most recent time range for the series with given hash.
68-
// Returns true if it failed, in which case the sample must be discarded.
68+
// Returns false if it failed, in which case the sample must be discarded.
6969
updateSampleInterval(hash uint64, start, end int64) bool
7070
}
7171

@@ -251,7 +251,7 @@ func (c *seriesCache) get(ctx context.Context, ref uint64) (*seriesCacheEntry, b
251251
}
252252

253253
// updateSampleInterval attempts to set the new most recent time range for the series with given hash.
254-
// Returns true if it failed, in which case the sample must be discarded.
254+
// Returns false if it failed, in which case the sample must be discarded.
255255
func (c *seriesCache) updateSampleInterval(hash uint64, start, end int64) bool {
256256
iv, ok := c.intervals[hash]
257257
if !ok || iv.accepts(start, end) {

0 commit comments

Comments
 (0)