Skip to content

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

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
merged 23 commits into from
May 28, 2024

Conversation

mapno
Copy link
Contributor

@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]
@mapno mapno force-pushed the generator-storage branch from 82642d2 to 5a36e23 Compare May 20, 2024 15:47
@mapno mapno changed the title Add storage to the local-blocks processor and flush blocks [2 of 3] May 21, 2024
@mapno mapno changed the title Allow flusing blocks from the local-blocks processor [2 of 3] May 21, 2024
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
Contributor 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
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
@mapno mapno deleted the generator-storage branch November 25, 2024 12:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants