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

Expose info for each TSDB #6329

Merged
merged 2 commits into from
May 8, 2023
Merged

Conversation

fpetkovski
Copy link
Contributor

This commit exposes the label set alongside the min and max time for each TSDB covered by a Store.

This information is used to scope the min time for a remote query so that we do not produce partial aggregates in distriuted mode.

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

Changes

Verification

@fpetkovski fpetkovski mentioned this pull request May 2, 2023
2 tasks
@fpetkovski fpetkovski force-pushed the expose-tsdb-infos branch 4 times, most recently from f855642 to 386d651 Compare May 2, 2023 16:21
func (s *ProxyStore) TSDBInfos() []infopb.TSDBInfo {
infos := make([]infopb.TSDBInfo, 0)
for _, store := range s.stores() {
infos = append(infos, store.TSDBInfos()...)
Copy link
Member

Choose a reason for hiding this comment

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

Do we need to filter out nil here if a store doesn't support this call?

Copy link
Contributor Author

@fpetkovski fpetkovski May 3, 2023

Choose a reason for hiding this comment

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

it seems that the spread operator can already handle nils. However, I added a test as a safeguard to make sure we don't have some weird regression in the future.

GiedriusS
GiedriusS previously approved these changes May 3, 2023
Copy link
Member

@GiedriusS GiedriusS left a comment

Choose a reason for hiding this comment

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

LGTM, just one comment

This commit exposes the label set alongside the min and max time
for each TSDB covered by a Store.

This information is used to scope the min time for a remote query
so that we do not produce partial aggregates in distriuted mode.

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

@saswatamcode saswatamcode left a comment

Choose a reason for hiding this comment

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

LGTM!

@fpetkovski fpetkovski merged commit 6e925ad into thanos-io:main May 8, 2023
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.

3 participants