prometheus/storage/remote
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
..
chunked.go Fix some warnings: 'redundant type from array, slice, or map composite literal' (#7109) 2020-04-15 11:17:41 +01:00
chunked_test.go Fix some warnings: 'redundant type from array, slice, or map composite literal' (#7109) 2020-04-15 11:17:41 +01:00
client.go Trace Remote Write requests (#7206) 2020-06-01 09:21:13 -06:00
client_test.go Improve testutil.ErrorEqual (#6471) 2019-12-17 21:11:33 +00:00
codec.go *: Consistent Error/Warning handling for SeriesSet iterator: Allowing Async Select (#7251) 2020-06-09 17:57:31 +01:00
codec_test.go Fix some warnings: 'redundant type from array, slice, or map composite literal' (#7109) 2020-04-15 11:17:41 +01:00
ewma.go Merge the 2.13 release branch to master (#6117) 2019-10-09 17:41:46 +02:00
intern.go Merge the 2.13 release branch to master (#6117) 2019-10-09 17:41:46 +02:00
intern_test.go Fix order of testutil.Equals (#6695) 2020-01-27 12:21:59 +00:00
max_gauge.go resolve race condition in maxGauge (#5647) 2019-06-13 20:55:08 +01:00
queue_manager.go increase the remote write bucket range (#7323) 2020-06-04 13:54:47 -06:00
queue_manager_test.go Add test for unregistering queue manager metrics 2020-05-05 14:14:04 -06:00
read.go *: Consistent Error/Warning handling for SeriesSet iterator: Allowing Async Select (#7251) 2020-06-09 17:57:31 +01:00
read_test.go *: Consistent Error/Warning handling for SeriesSet iterator: Allowing Async Select (#7251) 2020-06-09 17:57:31 +01:00
storage.go *: Consistent Error/Warning handling for SeriesSet iterator: Allowing Async Select (#7251) 2020-06-09 17:57:31 +01:00
storage_test.go storage/remote: add tests for config changes 2020-04-13 22:32:37 +00:00
write.go Remove duplicate metrics in QueueManager 2020-05-05 14:13:59 -06:00
write_test.go Handle secret changes in remote write ApplyConfig 2020-04-13 23:14:15 +00:00