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

fix(blooms): logql shard embeds tsdb #12396

Merged
merged 7 commits into from
Mar 29, 2024

Conversation

owen-d
Copy link
Member

@owen-d owen-d commented Mar 28, 2024

followup to #12394 which introduced a tricky bug. This PR removes the astmapper.ShardAnnotation entirely from the logql.Shard implementation to prevent similar bugs from accidentally happening in the future. TSDB power-of-two shards use bit-prefixes for shard inclusion as opposed to the modulos (bit-suffix) used by the old astmapper variant I originally added to Cortex and we ported over here. Thus when iterating TSDB indices but using the other shard calculation logic, we'd erroneously exclude data.

Signed-off-by: Owen Diehl <ow.diehl@gmail.com>
Signed-off-by: Owen Diehl <ow.diehl@gmail.com>
Signed-off-by: Owen Diehl <ow.diehl@gmail.com>
@owen-d owen-d requested a review from a team as a code owner March 28, 2024 23:50
@owen-d owen-d changed the title Blooms/logql shard embeds tsdb fix(blooms): logql shard embeds tsdb Mar 28, 2024
Copy link
Collaborator

@slim-bean slim-bean left a comment

Choose a reason for hiding this comment

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

LGTM

Signed-off-by: Owen Diehl <ow.diehl@gmail.com>
@owen-d owen-d force-pushed the blooms/logql-shard-embeds-tsdb branch from 738ae66 to b31c2c9 Compare March 29, 2024 00:16
Signed-off-by: Owen Diehl <ow.diehl@gmail.com>
…embeds-tsdb

Signed-off-by: Owen Diehl <ow.diehl@gmail.com>
Signed-off-by: Owen Diehl <ow.diehl@gmail.com>
@owen-d owen-d merged commit 6e1547f into grafana:main Mar 29, 2024
10 checks passed
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.

None yet

2 participants