prometheus/storage/remote
Dieter Plaetinck cda025b5b5
TSDB: demistify SeriesRefs and ChunkRefs (#9536)
* TSDB: demistify seriesRefs and ChunkRefs

The TSDB package contains many types of series and chunk references,
all shrouded in uint types.  Often the same uint value may
actually mean one of different types, in non-obvious ways.

This PR aims to clarify the code and help navigating to relevant docs,
usage, etc much quicker.

Concretely:

* Use appropriately named types and document their semantics and
  relations.
* Make multiplexing and demuxing of types explicit
  (on the boundaries between concrete implementations and generic
  interfaces).
* Casting between different types should be free.  None of the changes
  should have any impact on how the code runs.

TODO: Implement BlockSeriesRef where appropriate (for a future PR)

Signed-off-by: Dieter Plaetinck <dieter@grafana.com>

* feedback

Signed-off-by: Dieter Plaetinck <dieter@grafana.com>

* agent: demistify seriesRefs and ChunkRefs

Signed-off-by: Dieter Plaetinck <dieter@grafana.com>
2021-11-06 15:40:04 +05:30
..
chunked_test.go Testify: move to require (#8122) 2020-10-29 09:43:23 +00:00
chunked.go Fix some warnings: 'redundant type from array, slice, or map composite literal' (#7109) 2020-04-15 11:17:41 +01:00
client_test.go tests: Move from t.Errorf and others. (Part 2) (#9309) 2021-09-13 21:19:20 +02:00
client.go Enable HTTP2 again (#9398) 2021-09-26 23:16:12 +02:00
codec_test.go Remote-write: reuse memory for marshalling (#9412) 2021-10-29 14:44:40 -07:00
codec.go Add initial support for exemplar to the remote write receiver endpoint (#9319) 2021-09-21 14:53:27 -06:00
ewma.go Replace sync/atomic with uber-go/atomic (#7683) 2020-07-30 13:15:42 +05:30
intern_test.go Testify: move to require (#8122) 2020-10-29 09:43:23 +00:00
intern.go Move away from testutil, refactor imports (#8087) 2020-10-22 11:00:08 +02:00
max_timestamp.go Remote: Do not collect non-initialized timestamp metrics (#8060) 2020-10-15 23:53:59 +02:00
metadata_watcher_test.go Fix imports formatting 2021-11-02 19:52:34 +01:00
metadata_watcher.go Fix imports formatting 2021-11-02 19:52:34 +01:00
queue_manager_test.go TSDB: demistify SeriesRefs and ChunkRefs (#9536) 2021-11-06 15:40:04 +05:30
queue_manager.go TSDB: demistify SeriesRefs and ChunkRefs (#9536) 2021-11-06 15:40:04 +05:30
read_handler_test.go tests: Move from t.Errorf and others. (Part 2) (#9309) 2021-09-13 21:19:20 +02:00
read_handler.go Fix imports formatting 2021-11-02 19:52:34 +01:00
read_test.go Format Go source files using 'gofumpt -w -s -extra' 2021-11-02 19:52:34 +01:00
read.go LabelNames API with matchers (#9083) 2021-07-20 18:08:08 +05:30
storage_test.go Allow metric metadata to be propagated via Remote Write. (#6815) 2020-11-19 20:53:03 +05:30
storage.go storage/remote: Prevent two goroutines from endless loop (#8967) 2021-10-29 16:39:02 -07:00
write_handler_test.go TSDB: demistify SeriesRefs and ChunkRefs (#9536) 2021-11-06 15:40:04 +05:30
write_handler.go Format Go source files using 'gofumpt -w -s -extra' 2021-11-02 19:52:34 +01:00
write_test.go Allow metric metadata to be propagated via Remote Write. (#6815) 2020-11-19 20:53:03 +05:30
write.go TSDB: demistify SeriesRefs and ChunkRefs (#9536) 2021-11-06 15:40:04 +05:30