Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade thanos to release-0.19 #8

Merged
merged 101 commits into from
Apr 12, 2021
Merged

Upgrade thanos to release-0.19 #8

merged 101 commits into from
Apr 12, 2021

Conversation

songleo
Copy link
Member

@songleo songleo commented Apr 12, 2021

squat and others added 30 commits January 6, 2021 21:18
This small commit fixes the changelog entry for release v0.16.0 so that
the section title includes a link to the actual release.

Signed-off-by: Lucas Servén Marín <lserven@gmail.com>
* Delete deletion-mark.json at last when deleting a block

Signed-off-by: Marco Pracucci <marco@pracucci.com>

* Fixed linter

Signed-off-by: Marco Pracucci <marco@pracucci.com>
Signed-off-by: Namanl2001 <namanlakhwani@gmail.com>
Signed-off-by: Bradley <bwilsonhunt@gmail.com>
* Fix race condition in BinaryReader.LookupSymbol()

Signed-off-by: Marco Pracucci <marco@pracucci.com>

* Fixed BinaryReader receiver and added CHANGELOG entry

Signed-off-by: Marco Pracucci <marco@pracucci.com>
* ui: make old UI work with vanilla blocks

Make the old bucket viewer UI work with vanilla Prometheus blocks by
checking whether the `Thanos` part exists before formatting the HTML.

Signed-off-by: Giedrius Statkevičius <giedriuswork@gmail.com>

* CHANGELOG: update

Signed-off-by: Giedrius Statkevičius <giedriuswork@gmail.com>

* ui/bucket: fix according to @squat's suggestions

Signed-off-by: Giedrius Statkevičius <giedriuswork@gmail.com>

* ui: update bindata after latest changes

Signed-off-by: Giedrius Statkevičius <giedriuswork@gmail.com>
Signed-off-by: dmaiocchi <sodar@riseup.net>
Co-authored-by: Bartlomiej Plotka <bwplotka@gmail.com>
Query-frontend: use detailed text description for cmd
Signed-off-by: Marco Pracucci <marco@pracucci.com>
…#3714)

Signed-off-by: Bradley <bwilsonhunt@gmail.com>
…3657)

The http.Transport is not auto-tuning and one size does not seem to fit
all cases. In order to respond to a query a store gateway might need to
fetch a large (thousands) of postings, series and chunks.

While the number of idle connections has been increased recently it can
still be too low or expose bursty (opening, closing) behavior. Allow to
tune most of the http.Transport parameters. I considered embedding the
full Transport but there is already a Transport member.

Signed-off-by: Holger Hans Peter Freyther <holger@freyther.de>
* Update design.md

Update store.md

Update design.md

Update storage.md

Update troubleshooting.md

Signed-off-by: Biswajit Ghosh <biswajitghosh98@iitkgp.ac.in>

* Update design.md

Update store.md

Update design.md

Update troubleshooting.md

Update storage.md

Signed-off-by: Biswajit Ghosh <biswajitghosh98@iitkgp.ac.in>
Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
…hanos-io#3727)

* Update help messages with a consistent use of capitals and periods.

Signed-off-by: Matt Whitney <mattjwhitney@gmail.com>

* Update documentation to reflect message changes.

Signed-off-by: Matt Whitney <mattjwhitney@gmail.com>

* Run `make docs` to correct the documentation rather than manual edits.

Signed-off-by: Matt Whitney <mattjwhitney@gmail.com>
Signed-off-by: Mert Acikportali <mertacikportali@gmail.com>
This commit changes the file suffix from .go.go to simply .go.

Signed-off-by: Lucas Servén Marín <lserven@gmail.com>
…o#3738)

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

* docs/proposals/210701_endpoint_discovery.md: Add initial proposal

Signed-off-by: Lili Cosic <cosiclili@gmail.com>

* Update docs/proposals/210701_endpoint_discovery.md

Co-authored-by: Bartlomiej Plotka <bwplotka@gmail.com>

Co-authored-by: Bartlomiej Plotka <bwplotka@gmail.com>
…hanos-io#3752)

* Introduce "block-meta-fetch-concurrency" flag for compact and store

Furthermore consolidate the fetcher concurrency by moving the
fetcherConcurrency const to the fetcher code of the block package.

Signed-off-by: Johannes Frey <johannes.frey@daimler.com>

* Document flags

Signed-off-by: Johannes Frey <johannes.frey@daimler.com>
…s-io#2641) (thanos-io#3723)

* Add `--query-range.request-downsampled` flag to Query Frontend (thanos-io#2641)

Signed-off-by: Vladimir Kononov <krya-kryak@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Bartlomiej Plotka <bwplotka@gmail.com>
Signed-off-by: Vladimir Kononov <krya-kryak@users.noreply.github.com>

Co-authored-by: Bartlomiej Plotka <bwplotka@gmail.com>
Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
…anos-io#3760)

* Fix panic on concurrent index-header lazy reader usage and unload

Signed-off-by: Marco Pracucci <marco@pracucci.com>

* Addressed review comments

Signed-off-by: Marco Pracucci <marco@pracucci.com>

* Addressed review comments

Signed-off-by: Marco Pracucci <marco@pracucci.com>
Signed-off-by: Marco Pracucci <marco@pracucci.com>
…3759)

Signed-off-by: Marco Pracucci <marco@pracucci.com>
Pad the index size check in the compaction planner by 15% to avoid
situations where the sum of index bytes bloats to be larger than the
sum of the original index sizes.

* thanos-io#3724
* thanos-io#3750

Signed-off-by: Ben Kochie <superq@gmail.com>
Signed-off-by: soniasingla <soniasingla.1812@gmail.com>
Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>
…io#3675)

* Fix wrong store api link

Signed-off-by: Junyoung, Sung <junyoung.sung@navercorp.com>

* Fix store api link to absolute

Signed-off-by: Junyoung, Sung <junyoung.sung@navercorp.com>
* added retry function

Signed-off-by: Abhishek357 <abhisheksinghchauhan357@gmail.com>

* fixed CI test

Signed-off-by: Abhishek357 <abhisheksinghchauhan357@gmail.com>

* restructured code

Signed-off-by: Abhishek357 <abhisheksinghchauhan357@gmail.com>
GiedriusS and others added 23 commits February 26, 2021 19:26
Ensure that we have a consistent order of blocks that we are going to
downsample. `range` over maps doesn't enforce any particular order on
purpose.

This is needed for https://github.com/thanos-io/thanos/pull/3031/files.
ATM in that PR before downsampling we delete all directories which do
not match blocks ULIDs in the remote object storage. Ideally, we should
only keep around the files of a block which we are about to downsample.

It is impossible to do that properly ATM if during another iteration
we'd start from a different block. Thus, let's have a consistent order.

Signed-off-by: Giedrius Statkevičius <giedriuswork@gmail.com>
Signed-off-by: Stéphane Brillant <stephane.brillant@jive.com>
* Update ui npm deps to latest

Signed-off-by: Saswata Mukherjee <saswataminsta@yahoo.com>

* Fix linting errors

Signed-off-by: Saswata Mukherjee <saswataminsta@yahoo.com>

* Change camelcase lint rule

Signed-off-by: Saswata Mukherjee <saswataminsta@yahoo.com>
Signed-off-by: Prem Saraswat <prmsrswt@gmail.com>
…(downloading) (thanos-io#3031)

* block: precalculate hashes if enabled and use them during compaction

Added the possibility to ignore certain directories in
objstore.{Download,DownloadDir}. Do not download files which have the
same hash as in remote object storage. Wire up `--hash-func` so that
writers could specify what hash function to use when uploading. There is
no performance impact if no hash function has been explicitly specified.
Clean up the removal of files logic in Thanos Compact to ensure we do
not remove something that exists on disk already.

Tested manually + new tests cover all of this more or less.

Signed-off-by: Giedrius Statkevičius <giedriuswork@gmail.com>

* block: expose GatherFileStats and use it

Signed-off-by: Giedrius Statkevičius <giedriuswork@gmail.com>

* Revert "block: expose GatherFileStats and use it"

This reverts commit 259c70b.

Signed-off-by: Giedrius Statkevičius <giedriuswork@gmail.com>

* block: do not calc hash for dirs, add locks

Signed-off-by: Giedrius Statkevičius <giedriuswork@gmail.com>

* docs/tools: update

Signed-off-by: Giedrius Statkevičius <giedriuswork@gmail.com>

* shipper: pass s.hashFunc

Signed-off-by: Giedrius Statkevičius <giedriuswork@gmail.com>

* Fix according to Bartek's comments

Signed-off-by: Giedrius Statkevičius <giedriuswork@gmail.com>

* compact: clean up comment

Signed-off-by: Giedrius Statkevičius <giedriuswork@gmail.com>

* block: close with log on error

Signed-off-by: Giedrius Statkevičius <giedriuswork@gmail.com>

* *: remove unused FNs

Signed-off-by: Giedrius Statkevičius <giedriuswork@gmail.com>

* compact: add e2e test for new hash functionality

Signed-off-by: Giedrius Statkevičius <giedriuswork@gmail.com>

* Fix according to Bartek's comments

Signed-off-by: Giedrius Statkevičius <giedriuswork@gmail.com>
* Upgrade jsonnet tooling

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

* Fix bingo version issue

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

* Fix unintended removal issue

Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>
* Update reference of master to main in docs

Signed-off-by: Prem Saraswat <prmsrswt@gmail.com>

* Update image tag in tutorials/kubernetes-helm

Signed-off-by: Prem Saraswat <prmsrswt@gmail.com>
Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
Missed from: thanos-io#3860

Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
Signed-off-by: yeya24 <yb532204897@gmail.com>
…hanos-io#3889)

* Fix bug introduced in PR thanos-io#3740

Signed-off-by: Hitanshu Mehta <hitanshu99amehta@gmail.com>

* Minor change in test

Signed-off-by: Hitanshu Mehta <hitanshu99amehta@gmail.com>

Co-authored-by: Hitanshu Mehta <44025541+hitanshu-mehta@users.noreply.github.com>
…rs (thanos-io#3886) (thanos-io#3890)

* rewrite delete should delete a series only if it matches all matchers in a deletion request

Signed-off-by: yeya24 <yb532204897@gmail.com>

* add test case

Signed-off-by: yeya24 <yb532204897@gmail.com>

Co-authored-by: Ben Ye <yb532204897@gmail.com>
Currently, the thanos Receiver infers whether it should use TLS for
the gRPC clients that forwards time series to other receivers based on
whether the remote-write HTTP server uses TLS. This is not correct, as
the HTTP server may use TLS without the gRPC server using TLS. This
commit fixes the inference.

Longer-term, this will be taken care of by the receive/router split.

Signed-off-by: Lucas Servén Marín <lserven@gmail.com>
Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
* Fix partial and empty matchers match

Signed-off-by: yeya24 <yb532204897@gmail.com>

* add testcase for non-equal matchers

Signed-off-by: yeya24 <yb532204897@gmail.com>
…usage introduced in 0.17 (thanos-io#3943)

* Added receive benchmark, baseline.

```
goos: linux
goarch: amd64
pkg: github.com/thanos-io/thanos/pkg/receive
BenchmarkHandlerReceiveHTTP
BenchmarkHandlerReceiveHTTP/typical_labels_under_1KB,_500_of_them.
BenchmarkHandlerReceiveHTTP/typical_labels_under_1KB,_500_of_them./OK
BenchmarkHandlerReceiveHTTP/typical_labels_under_1KB,_500_of_them./OK-12      	   22260	   1550152 ns/op	 1380340 B/op	    6093 allocs/op
BenchmarkHandlerReceiveHTTP/typical_labels_under_1KB,_500_of_them./conflict_errors
BenchmarkHandlerReceiveHTTP/typical_labels_under_1KB,_500_of_them./conflict_errors-12         	    6619	   6430408 ns/op	 4522487 B/op	   26118 allocs/op
BenchmarkHandlerReceiveHTTP/typical_labels_under_1KB,_5000_of_them.
BenchmarkHandlerReceiveHTTP/typical_labels_under_1KB,_5000_of_them./OK
BenchmarkHandlerReceiveHTTP/typical_labels_under_1KB,_5000_of_them./OK-12                     	    2695	  17208794 ns/op	15072963 B/op	   60441 allocs/op
BenchmarkHandlerReceiveHTTP/typical_labels_under_1KB,_5000_of_them./conflict_errors
BenchmarkHandlerReceiveHTTP/typical_labels_under_1KB,_5000_of_them./conflict_errors-12        	     474	  72533286 ns/op	46396932 B/op	  260141 allocs/op
BenchmarkHandlerReceiveHTTP/extremely_large_label_value_10MB,_10_of_them
BenchmarkHandlerReceiveHTTP/extremely_large_label_value_10MB,_10_of_them/OK
BenchmarkHandlerReceiveHTTP/extremely_large_label_value_10MB,_10_of_them/OK-12                	     270	 137050518 ns/op	226595379 B/op	     132 allocs/op
BenchmarkHandlerReceiveHTTP/extremely_large_label_value_10MB,_10_of_them/conflict_errors
BenchmarkHandlerReceiveHTTP/extremely_large_label_value_10MB,_10_of_them/conflict_errors-12   	      21	1616025443 ns/op	698724321 B/op	     408 allocs/op
PASS

Process finished with exit code 0
```


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

* Copy labels.

```
GOROOT=/home/bwplotka/.gvm/gos/go1.15 #gosetup
GOPATH=/home/bwplotka/Repos/thanosgopath #gosetup
/home/bwplotka/.gvm/gos/go1.15/bin/go test -c -o /tmp/___BenchmarkHandlerReceiveHTTP_in_github_com_thanos_io_thanos_pkg_receive github.com/thanos-io/thanos/pkg/receive #gosetup
/tmp/___BenchmarkHandlerReceiveHTTP_in_github_com_thanos_io_thanos_pkg_receive -test.v -test.bench ^\QBenchmarkHandlerReceiveHTTP\E$ -test.run ^$ -test.benchmem -test.benchtime=30s
goos: linux
goarch: amd64
pkg: github.com/thanos-io/thanos/pkg/receive
BenchmarkHandlerReceiveHTTP
BenchmarkHandlerReceiveHTTP/typical_labels_under_1KB,_500_of_them
BenchmarkHandlerReceiveHTTP/typical_labels_under_1KB,_500_of_them/OK
BenchmarkHandlerReceiveHTTP/typical_labels_under_1KB,_500_of_them/OK-12      	   25887	   1537262 ns/op	 1380023 B/op	    6092 allocs/op
BenchmarkHandlerReceiveHTTP/typical_labels_under_1KB,_500_of_them/conflict_errors
BenchmarkHandlerReceiveHTTP/typical_labels_under_1KB,_500_of_them/conflict_errors-12         	    4237	   7547968 ns/op	 4522583 B/op	   26118 allocs/op
BenchmarkHandlerReceiveHTTP/typical_labels_under_1KB,_5000_of_them
BenchmarkHandlerReceiveHTTP/typical_labels_under_1KB,_5000_of_them/OK
BenchmarkHandlerReceiveHTTP/typical_labels_under_1KB,_5000_of_them/OK-12                     	    2205	  16513380 ns/op	15071092 B/op	   60420 allocs/op
BenchmarkHandlerReceiveHTTP/typical_labels_under_1KB,_5000_of_them/conflict_errors
BenchmarkHandlerReceiveHTTP/typical_labels_under_1KB,_5000_of_them/conflict_errors-12        	     525	  67278233 ns/op	46396645 B/op	  260141 allocs/op
BenchmarkHandlerReceiveHTTP/extremely_large_label_value_10MB,_10_of_them
BenchmarkHandlerReceiveHTTP/extremely_large_label_value_10MB,_10_of_them/OK
BenchmarkHandlerReceiveHTTP/extremely_large_label_value_10MB,_10_of_them/OK-12               	     285	 148049189 ns/op	226596168 B/op	     132 allocs/op
BenchmarkHandlerReceiveHTTP/extremely_large_label_value_10MB,_10_of_them/conflict_errors
BenchmarkHandlerReceiveHTTP/extremely_large_label_value_10MB,_10_of_them/conflict_errors-12  	      20	1731361499 ns/op	698722550 B/op	     401 allocs/op
PASS

Process finished with exit code 0

```

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

* Addded bench.,

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

* Fix.

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

* Improved API.

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

* Changelog.

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

* Addressed Lucas comments.

Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
* compact: clean up directories properly

I couldn't stop thinking about this code for some reason and I have
figured that I had missed one case in thanos-io#3031. We need to also clean up
the directories in compaction groups. A compaction could fail leaving
some new directory with a random ULID on the disk. Before attempting to
do another compaction loop, we need to remove it as well because the
compaction process always produces a new, unique directory.

Signed-off-by: Giedrius Statkevičius <giedriuswork@gmail.com>

* Remove all non expected dirs.

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

* Addressed comment.

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

Co-authored-by: Bartlomiej Plotka <bwplotka@gmail.com>
…eed. (thanos-io#3968)

Fixes: thanos-io#3917

Long term fix: thanos-io#3967

Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
…hanos-io#3960) (thanos-io#3999)

Currently, if an alerting rule having the same name with different
severity labels is being returned from different replicas then they
are being treated as separate alerts.

Given the following alerts a1,a2 with severities s1,s2 returned from
replicas r1,2:

a1[s1,r1]
a1[s2,r1]
a1[s1,r2]
a1[s2,r2]

Then, currently, the algorithm deduplicates to:

a1[s1]
a1[s2]
a1[s1]
a1[s2]

Instead of the intendet result:

a1[s1]
a1[s2]

This fixes it by removing replica labels before sorting labels for
deduplication.

Signed-off-by: Sergiusz Urbaniak <sergiusz.urbaniak@gmail.com>
# Conflicts:
#	CHANGELOG.md

Co-authored-by: Sergiusz Urbaniak <sergiusz.urbaniak@gmail.com>
Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
@clyang82
Copy link

/lgtm

@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: clyang82, songleo

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-robot openshift-merge-robot merged commit 8460e86 into stolostron:release-2.3 Apr 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.