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

Use TSDB index prefix on blooms directory #11977

Merged
merged 4 commits into from
Feb 16, 2024

Conversation

salvacorts
Copy link
Contributor

@salvacorts salvacorts commented Feb 16, 2024

What this PR does / why we need it:
Before this PR, bloom blocks and metas were written to bloom/<day>/<tenant>..., but the gateway expects it to be at bloom/<index prefix>_<day>/<tenant>. This PR adds the index prefix to the path.

Special notes for your reviewer:

Checklist

  • Reviewed the CONTRIBUTING.md guide (required)
  • Documentation added
  • Tests updated
  • CHANGELOG.md updated
    • If the change is worth mentioning in the release notes, add add-to-release-notes label
  • Changes that require user attention or interaction to upgrade are documented in docs/sources/setup/upgrade/_index.md
  • For Helm chart changes bump the Helm chart version in production/helm/loki/Chart.yaml and update production/helm/loki/CHANGELOG.md and production/helm/loki/README.md. Example PR
  • If the change is deprecating or removing a configuration option, update the deprecated-config.yaml and deleted-config.yaml files respectively in the tools/deprecated-config-checker directory. Example PR

tenant string,
ownershipRange v1.FingerprintBounds,
) error {
logger := log.With(s.logger, "ownership", ownershipRange, "org_id", tenant, "table", table)
Copy link
Contributor

Choose a reason for hiding this comment

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

You can change the signature to accept the struct, not a pointer.

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think we need to log the full table name, the day is probably more convenient.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'd say seeing the full table name is clearer wrt which TSDB table are we working with (and where will we write to)

@pull-request-size pull-request-size bot added size/L and removed size/M labels Feb 16, 2024
Copy link
Contributor

@chaudum chaudum left a comment

Choose a reason for hiding this comment

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

LGTM

Do you also want to use the new DayTable struct in the bloomgateway code?

@salvacorts salvacorts marked this pull request as ready for review February 16, 2024 16:07
@salvacorts salvacorts requested a review from a team as a code owner February 16, 2024 16:07
@salvacorts salvacorts merged commit ef40136 into main Feb 16, 2024
8 checks passed
@salvacorts salvacorts deleted the salvacorts/bloom-compactor-index-prefix branch February 16, 2024 16:08
chaudum added a commit that referenced this pull request Feb 21, 2024
The support for table prefixes was introduced with
#11977

Signed-off-by: Christian Haudum <[email protected]>
rhnasc pushed a commit to inloco/loki that referenced this pull request Apr 12, 2024
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.

2 participants