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

Ruler: Add update label names routine for stateful ruler #6689

Merged
merged 1 commit into from Sep 1, 2023

Conversation

saswatamcode
Copy link
Member

  • I added CHANGELOG entry for this change.
  • Change is not relevant to the end user.

Changes

Seems like we missed the label name filter update routine for stateful Ruler, which operates with single TSDBStore.

Verification

Signed-off-by: Saswata Mukherjee <saswataminsta@yahoo.com>
@@ -642,6 +642,21 @@ func runRule(
)
storeServer := store.NewLimitedStoreServer(store.NewInstrumentedStoreServer(reg, tsdbStore), reg, conf.storeRateLimits)
options = append(options, grpcserver.WithServer(store.RegisterStoreServer(storeServer, logger)))

ctx, cancel := context.WithCancel(context.Background())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there a reason we dont use top level context + cancel for all the concurrent routines? I was wondering yesterday; if some top one fails this one wont be canceled.

I would move ctx, cancel to top i think.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was wrong about the context. The cancellation is handled by the run.Group invoking the interrupt function passed to g.Add, which means that this is canceling its own context which has correct semantics i think.
Having said that, run.Group is not very context friendly i think.

Copy link
Contributor

@MichaHoffmann MichaHoffmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, we canc clean up ctx in followup

@saswatamcode saswatamcode merged commit 18561b4 into thanos-io:main Sep 1, 2023
15 of 16 checks passed
coleenquadros pushed a commit to coleenquadros/thanos that referenced this pull request Sep 18, 2023
)

Signed-off-by: Saswata Mukherjee <saswataminsta@yahoo.com>
saswatamcode added a commit to saswatamcode/thanos that referenced this pull request Sep 20, 2023
)

Signed-off-by: Saswata Mukherjee <saswataminsta@yahoo.com>
saswatamcode added a commit that referenced this pull request Sep 20, 2023
* Update thanos engine and Prometheus dependencies (#6664)

* Update thanos engine and Prometheus dependencies

This commit bumps thanos/promql-engine to latest main and resolves
breaking changes from the prometheus/prometheus dependency.

Signed-off-by: Filip Petkovski <filip.petkovsky@gmail.com>

* Add changelog entry

Signed-off-by: Filip Petkovski <filip.petkovsky@gmail.com>

* Avoid closing head more than once

Signed-off-by: Filip Petkovski <filip.petkovsky@gmail.com>

* Remove call to t.TempDir()

Signed-off-by: Filip Petkovski <filip.petkovsky@gmail.com>

---------

Signed-off-by: Filip Petkovski <filip.petkovsky@gmail.com>

* build(deps): bump github.com/prometheus/alertmanager (#6671)

Bumps [github.com/prometheus/alertmanager](https://github.com/prometheus/alertmanager) from 0.25.0 to 0.25.1.
- [Release notes](https://github.com/prometheus/alertmanager/releases)
- [Changelog](https://github.com/prometheus/alertmanager/blob/v0.25.1/CHANGELOG.md)
- [Commits](prometheus/alertmanager@v0.25.0...v0.25.1)

---
updated-dependencies:
- dependency-name: github.com/prometheus/alertmanager
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* store: add acceptance tests for label methods to bucket store (#6668)

Signed-off-by: Michael Hoffmann <mhoffm@posteo.de>

* Ruler: Add update label names routine for stateful ruler (#6689)

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

* Store: add some acceptance tests for label matching (#6691)

Signed-off-by: Michael Hoffmann <mhoffm@posteo.de>

* Store: fix regex matching with set that matches empty (#6692)

Signed-off-by: Michael Hoffmann <mhoffm@posteo.de>

* Store: add failing test for potential dedup issue (#6693)

Signed-off-by: Michael Hoffmann <mhoffm@posteo.de>

* Store: fix block dedup (#6697)

Signed-off-by: Michael Hoffmann <mhoffm@posteo.de>

* Add Shipper bytes uploaded metric #6438 (#6544)

* [FEAT] Add uploaded bytes metric

Signed-off-by: rita.canavarro <rita.canavarro@farfetch.com>

* [FEAT] Add PR number to log

Signed-off-by: rita.canavarro <rita.canavarro@farfetch.com>

* [FIX] Log msg

Signed-off-by: rita.canavarro <rita.canavarro@farfetch.com>

* [FEAT] Clean code

Signed-off-by: rita.canavarro <rita.canavarro@farfetch.com>

* [FIX] Remove shadow code

Signed-off-by: rita.canavarro <rita.canavarro@farfetch.com>

* [FIX] Go format

Signed-off-by: rita.canavarro <rita.canavarro@farfetch.com>

* [FEAT] Update objstore

Signed-off-by: rita.canavarro <rita.canavarro@farfetch.com>

* [FEAT] Update objstore package

Signed-off-by: rita.canavarro <rita.canavarro@farfetch.com>

* [FEAT] Update storage.md

Signed-off-by: rita.canavarro <rita.canavarro@farfetch.com>

* [FEAT] Update erroring bucket

Signed-off-by: rita.canavarro <rita.canavarro@farfetch.com>

* [FEAT] Update erroring bucket

Signed-off-by: rita.canavarro <rita.canavarro@farfetch.com>

---------

Signed-off-by: rita.canavarro <rita.canavarro@farfetch.com>

* Update objstore library to latest main (#6722)

This commit updates the obstore library to the latest main version
which optimizes the Iter operation to only request object names.

Signed-off-by: Filip Petkovski <filip.petkovsky@gmail.com>

* Store: store responses should always be sorted (#6706)

* Store: always sort, just compare labelset in proxy heap

Signed-off-by: Michael Hoffmann <mhoffm@posteo.de>

* Store: add escape hatch to skip store resorting

Signed-off-by: Michael Hoffmann <mhoffm@posteo.de>

* Store: remove stringset

This is the wrong approach to detect if we need to resort. It cannot
detect if we might end up with an unsorted series set if we add
extLabels.

Signed-off-by: Michael Hoffmann <mhoffm@posteo.de>

* Docs: drop paragraph about deduplication on inner labels

Signed-off-by: Michael Hoffmann <mhoffm@posteo.de>

---------

Signed-off-by: Michael Hoffmann <mhoffm@posteo.de>
Co-authored-by: Michael Hoffmann <michael.hoffmann@aiven.io>

* Updates busybox SHA (#6724)

Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: fpetkovski <fpetkovski@users.noreply.github.com>

* Cut patch release v0.32.3

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

---------

Signed-off-by: Filip Petkovski <filip.petkovsky@gmail.com>
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Michael Hoffmann <mhoffm@posteo.de>
Signed-off-by: Saswata Mukherjee <saswataminsta@yahoo.com>
Signed-off-by: rita.canavarro <rita.canavarro@farfetch.com>
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Filip Petkovski <filip.petkovsky@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Michael Hoffmann <mhoffm@posteo.de>
Co-authored-by: Rita Canavarro <98762287+ritaCanavarro@users.noreply.github.com>
Co-authored-by: Michael Hoffmann <michael.hoffmann@aiven.io>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: fpetkovski <fpetkovski@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants