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

Allow flushing blocks from the local-blocks processor [2 of 3] #3691

Merged
merged 23 commits into from
May 28, 2024

Conversation

mapno
Copy link
Member

@mapno mapno commented May 20, 2024

What this PR does:

This PR adds the ability to the local-blocks processor to flush blocks to storage, with the objective of flushing blocks with a replication factor of 1 (see previous PR: #3628).

It adds the store module as a dependency of the metrics-generator. The module is only instantiated when the storage is configured, working as before when it is not configured.

Checklist

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

cmd/tempo/app/modules.go Outdated Show resolved Hide resolved
@mapno mapno changed the title Add storage to the local-blocks processor and flush blocks [2 of 3] Allow flusing blocks from the local-blocks processor [2 of 3] May 21, 2024
@mapno mapno changed the title Allow flusing blocks from the local-blocks processor [2 of 3] Allow flushing blocks from the local-blocks processor [2 of 3] May 21, 2024
cmd/tempo/app/modules.go Outdated Show resolved Hide resolved
if err != nil {
_ = level.Error(p.logger).Log("msg", "failed to flush a block", "err", err)

if op.attempts < 3 {
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's copy the behavior of the ingester, which doesn't limit retries on flushing to object storage. This will make it tolerate network or other transient errors as long as needed.

Copy link
Member Author

Choose a reason for hiding this comment

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

Isn't allowing infinite retries dangerous?

@mapno mapno marked this pull request as ready for review May 23, 2024 10:52
cmd/tempo/app/modules.go Outdated Show resolved Hide resolved
Copy link
Contributor

@mdisibio mdisibio left a comment

Choose a reason for hiding this comment

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

Nice work! One more small nit but going ahead and approving.

@mapno mapno enabled auto-merge (squash) May 28, 2024 13:40
@mapno mapno merged commit 7c68b25 into grafana:main May 28, 2024
13 of 14 checks passed
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.

2 participants