prometheus/promql
Kemal Akkoyun 66dfb951c4
*: Consistent Error/Warning handling for SeriesSet iterator: Allowing Async Select (#7251)
* Add errors and Warnings to SeriesSet

Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>

* Change Querier interface and refactor accordingly

Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>

* Refactor promql/engine to propagate warnings at eval stage

Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>

* Address review issues

Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>

* Make sure all the series from all Selects are pre-advanced

Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>

* Address review issues

Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>

* Separate merge series sets

Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>

* Clean

Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>

* Refactor merge querier failure handling

Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>

* Refactored and simplified fanout with improvements from incoming chunk iterator PRs.

* Secondary logic is hidden, instead of weird failed series set logic we had.
* Fanout is well commented
* Fanout closing record all errors
* MergeQuerier improved API (clearer)
* deferredGenericMergeSeriesSet is not needed as we return no samples anyway for failed series sets (next = false).

Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>

* Fix formatting

Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>

* Fix CI issues

Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>

* Added final tests for error handling.

Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>

* Addressed Brian's comments.

* Moved hints in populate to be allocated only when needed.
* Used sync.Once in secondary Querier to achieve all-or-nothing partial response logic.
* Select after first Next is done will panic.

NOTE: in lazySeriesSet in theory we could just panic, I think however we can
totally just return error, it will panic in expand anyway.

Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>

* Utilize errWithWarnings

Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>

* Fix recently introduced expansion issue

Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>

* Add tests for secondary querier error handling

Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>

* Implement lazy merge

Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>

* Add name to test cases

Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>

* Reorganize

Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>

* Address review comments

Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>

* Address review comments

Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>

* Remove redundant warnings

Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>

* Fix rebase mistake

Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>

Co-authored-by: Bartlomiej Plotka <bwplotka@gmail.com>
2020-06-09 17:57:31 +01:00
..
fuzz-data textparse: Add fuzzing and fix bug caught 2017-07-07 11:12:17 +02:00
parser promql/parser: Cleanup generatedParserResult accross reuse 2020-04-16 01:51:08 +02:00
testdata Return NaN for histogram_quantile when buckets have 0 observations (#7318) 2020-06-01 09:40:39 +01:00
bench_test.go Merge branch 'master' into split_parser 2020-02-19 15:18:13 +01:00
engine.go *: Consistent Error/Warning handling for SeriesSet iterator: Allowing Async Select (#7251) 2020-06-09 17:57:31 +01:00
engine_test.go *: Consistent Error/Warning handling for SeriesSet iterator: Allowing Async Select (#7251) 2020-06-09 17:57:31 +01:00
functions.go change labelset comparison in promql engine to avoid false positive during detection of duplicates (#7058) 2020-05-12 14:03:15 -07:00
functions_test.go Bartek's suggestions 2020-02-25 13:57:30 +01:00
fuzz.go Fuzz: limit input size (#7317) 2020-05-31 09:42:56 +02:00
promql_test.go Addressed comments. 2020-02-17 18:03:57 +00:00
quantile.go Return NaN for histogram_quantile when buckets have 0 observations (#7318) 2020-06-01 09:40:39 +01:00
query_logger.go Remove MaxConcurrent from the PromQL engine opts (#6712) 2020-01-28 20:38:49 +00:00
query_logger_test.go promql: make active query tracker context-aware (#6701) 2020-01-27 22:29:44 +00:00
test.go Fixed wrongly handled not ready TSDB on web and API. (#7182) 2020-04-29 17:16:14 +01:00
test_test.go *: Consistent Error/Warning handling for SeriesSet iterator: Allowing Async Select (#7251) 2020-06-09 17:57:31 +01:00
value.go Merge branch 'master' into split_parser 2020-02-19 15:18:13 +01:00