Skip to content

max_global_traces_per_user: take into account ingestion.tenant_shard_size when converting to local limit#3618

Merged
yvrhdn merged 4 commits intografana:mainfrom
yvrhdn:kvrhdn/max_global_traces_per_user_shard_size
May 31, 2024
Merged

max_global_traces_per_user: take into account ingestion.tenant_shard_size when converting to local limit#3618
yvrhdn merged 4 commits intografana:mainfrom
yvrhdn:kvrhdn/max_global_traces_per_user_shard_size

Conversation

@yvrhdn
Copy link
Copy Markdown
Contributor

@yvrhdn yvrhdn commented Apr 26, 2024

What this PR does:
Fixes an oversight when adding ingester shuffle sharding support (#3506).

max_global_traces_per_user is a global limit enforced in the ingester. It is converted to a local limit by dividing the global limit by the amount of (healthy) ingesters in the ring. When ingestion.tenant_shard_size is set the tenant will have a smaller ring than the total count of ingesters. As a result the actual local limit would be higher in those cases.

Before:

actual local limit = max_global_traces_per_user / ingester instances

After:

actual local limit = max_global_traces_per_user / min(ingester instances, tenant_shard_size)

Which issue(s) this PR fixes:
Fixes #

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

Copy link
Copy Markdown
Contributor

@mapno mapno left a comment

Choose a reason for hiding this comment

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

Nice fix

Copy link
Copy Markdown
Member

@electron0zero electron0zero left a comment

Choose a reason for hiding this comment

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

good catch :shipit:

@yvrhdn yvrhdn enabled auto-merge (squash) May 31, 2024 17:15
@yvrhdn yvrhdn merged commit f9bd4fc into grafana:main May 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants