Skip to content

fix: bug where known streams could be rejected #16823

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

Merged

Conversation

grobinson-grafana
Copy link
Contributor

@grobinson-grafana grobinson-grafana commented Mar 18, 2025

What this PR does / why we need it:

This pull request fixes a bug where known streams could be rejected whenever stream limit was exceeded. The bug occurred when streams for a tenant were sharded over a number of partitions. The problem was that the frontend did not take the intersection of unknown streams from all responses, so if a stream was unknown on instance1, but known to instance2, it would still be rejected.

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:

Checklist

  • Reviewed the CONTRIBUTING.md guide (required)
  • Documentation added
  • Tests updated
  • Title matches the required conventional commits format, see here
    • Note that Promtail is considered to be feature complete, and future development for logs collection will be in Grafana Alloy. As such, feat PRs are unlikely to be accepted unless a case can be made for the feature actually being a bug fix to existing behavior.
  • Changes that require user attention or interaction to upgrade are documented in docs/sources/setup/upgrade/_index.md
  • 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
@grobinson-grafana grobinson-grafana force-pushed the grobinson/fix-unknown-streams-deduplication-in-frontend branch from 295a06c to 59c353d Compare March 18, 2025 23:56
@grobinson-grafana grobinson-grafana marked this pull request as ready for review March 19, 2025 00:04
@grobinson-grafana grobinson-grafana requested a review from a team as a code owner March 19, 2025 00:04
@grobinson-grafana grobinson-grafana force-pushed the grobinson/fix-unknown-streams-deduplication-in-frontend branch from 59c353d to 5040a8b Compare March 19, 2025 00:04
@pull-request-size pull-request-size bot added size/L and removed size/M labels Mar 19, 2025
@grobinson-grafana grobinson-grafana changed the title fix: fix unknown streams deduplication in the limits frontend Mar 19, 2025
@grobinson-grafana grobinson-grafana force-pushed the grobinson/fix-unknown-streams-deduplication-in-frontend branch from 5040a8b to fa431ff Compare March 19, 2025 00:08
This commit fixes a bug where known streams could be rejected
whenever the stream limit was exceeded. The bug occurred when
streams for a tenant where sharded over a number of partitions.
The problem was that the frontend did not take the intersection
of unknown streams from all responses, so if a stream was unknown
to the customer of partition 1, but known to the consumer of
partition 2, it would still be rejected.
@grobinson-grafana grobinson-grafana force-pushed the grobinson/fix-unknown-streams-deduplication-in-frontend branch from fa431ff to 41fdc7b Compare March 19, 2025 00:09
@grobinson-grafana grobinson-grafana merged commit e707597 into main Mar 19, 2025
61 checks passed
@grobinson-grafana grobinson-grafana deleted the grobinson/fix-unknown-streams-deduplication-in-frontend branch March 19, 2025 09:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2 participants