prometheus/storage
Bryan Boreham d614ae9ecf
[RFC] Add method to get reference number for TSDB Appender (#8600)
* Add method to get reference number for TSDB Appender

In situations where we need to copy labels before calling Add(),
GetRef() allows to check first, then call AddFast() in the case that the series
is already known.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>

* Add explicit interface for GetRef() method

Suggested in code review by @bwplotka

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>

* Rename OptionalGetRef to GetRef

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>

* Simplify return value of GetRef()

0 can be relied on to mean 'no reference'

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2021-03-19 19:28:55 +00:00
..
remote Further increase max log line in remote write client (#8616) 2021-03-18 16:53:18 +00:00
buffer.go storage: Added Chunks{Queryable/Querier/SeriesSet/Series/Iteratable. Added generic Merge{SeriesSet/Querier} implementation. (#7005) 2020-03-24 20:15:47 +00:00
buffer_test.go Optimized vector selector 2021-03-11 14:32:56 +01:00
fanout.go Add circular in-memory exemplars storage (#6635) 2021-03-16 15:17:45 +05:30
fanout_test.go Combine Appender.Add and AddFast into a single Append method. (#8489) 2021-02-18 17:37:00 +05:30
generic.go tsdb: Added ChunkQueryable implementations to db; unified MergeSeriesSets and vertical to single struct. (#7069) 2020-07-31 16:03:02 +01:00
interface.go [RFC] Add method to get reference number for TSDB Appender (#8600) 2021-03-19 19:28:55 +00:00
lazy.go tsdb: Added ChunkQueryable implementations to db; unified MergeSeriesSets and vertical to single struct. (#7069) 2020-07-31 16:03:02 +01:00
memoized_iterator.go Update storage/memoized_iterator.go 2021-03-15 09:27:20 +01:00
memoized_iterator_test.go Optimized vector selector 2021-03-11 14:32:56 +01:00
merge.go Fix sample deduplication in chainSampleIterator 2021-03-12 12:34:23 +01:00
merge_test.go Fix sample deduplication in chainSampleIterator 2021-03-12 12:34:23 +01:00
noop.go Add matchers to LabelValues() call (#8400) 2021-02-09 23:08:35 +05:30
secondary.go Add matchers to LabelValues() call (#8400) 2021-02-09 23:08:35 +05:30
series.go Fix golint issue caused by incorrect func name (#7756) 2020-08-06 20:27:37 +01:00