prometheus/promql
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
..
fuzz-data textparse: Add fuzzing and fix bug caught 2017-07-07 11:12:17 +02:00
parser Fix imports formatting 2021-11-02 19:52:34 +01:00
testdata promql: Add more test cases for `histogram_quantile` 2021-10-20 16:15:44 +02:00
bench_test.go TSDB: demistify SeriesRefs and ChunkRefs (#9536) 2021-11-06 15:40:04 +05:30
engine.go Format Go source files using 'gofumpt -w -s -extra' 2021-11-02 19:52:34 +01:00
engine_test.go Format Go source files using 'gofumpt -w -s -extra' 2021-11-02 19:52:34 +01:00
functions.go Format Go source files using 'gofumpt -w -s -extra' 2021-11-02 19:52:34 +01:00
functions_test.go use kahan summation for aggregation functions 2021-10-30 19:41:36 +05:30
fuzz.go Add new Go build tags. 2021-08-27 10:24:14 +02:00
promql_test.go Testify: move to require (#8122) 2020-10-29 09:43:23 +00:00
quantile.go Fix off-by-one error in funcHistogramQuantile / ensureMonotonic (#7393) 2020-06-15 11:32:10 +01:00
query_logger.go Format Go source files using 'gofumpt -w -s -extra' 2021-11-02 19:52:34 +01:00
query_logger_test.go tests: Move from t.Errorf and others. (Part 2) (#9309) 2021-09-13 21:19:20 +02:00
test.go tests: Move from t.Errorf and others. (Part 2) (#9309) 2021-09-13 21:19:20 +02:00
test_test.go Promtool: Add feature flags to unit tests (#8958) 2021-06-30 22:43:39 +01:00
value.go Add present_over_time (#9097) 2021-07-29 12:38:11 +02:00