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

Prevent ingesting samples older than past_grace_period #8262

Merged
merged 15 commits into from
Jun 6, 2024
Merged

Conversation

colega
Copy link
Contributor

@colega colega commented Jun 3, 2024

What this PR does

This PR implements a new limit, similar to creation_grace_period, that limits the age of the ingested samples based on the wall clock.

It also takes into account the OOO window, to avoid having to change both settings when OOO window is modified.

The default value of 1 week should cover any observability needs. If some customer wants to backfill their samples in order, they can increase the value of that to 100y in the config to cover 100 years, for example.

Which issue(s) this PR fixes or relates to

Fixes #

Checklist

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

This PR implements a new limit, similar to `creation_grace_period`, that
limits the age of the ingested samples based on the wall clock.

It also takes into account the OOO window, to avoid having to change
both settings when OOO window is modified.

The default value of 1 week should cover any observability needs. If
some customer wants to backfill their samples in order, they can
increase the value of that to `100y` in the config to cover 100 years,
for example.

Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
@colega colega marked this pull request as ready for review June 3, 2024 16:19
@colega colega requested review from a team as code owners June 3, 2024 16:19
Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
@colega colega requested a review from jdbaldry as a code owner June 4, 2024 07:58
Copy link
Member

@pstibrany pstibrany 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!

pkg/ingester/lifecycle_test.go Outdated Show resolved Hide resolved
pkg/util/validation/limits.go Outdated Show resolved Hide resolved
Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
@colega
Copy link
Contributor Author

colega commented Jun 5, 2024

I'll wait for @jdbaldry's review on the runbooks before merging.

Copy link
Member

@jdbaldry jdbaldry left a comment

Choose a reason for hiding this comment

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

Docs LGTM and are consistent with the rest of the runbook format.

nit: consider using contractions to match our tone guidelines: https://grafana.com/docs/writers-toolkit/write/style-guide/voice-tone-guidelines/#tone

docs/sources/mimir/manage/mimir-runbooks/_index.md Outdated Show resolved Hide resolved
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
@colega colega enabled auto-merge (squash) June 6, 2024 10:31
Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
@colega colega merged commit d1ec120 into main Jun 6, 2024
29 checks passed
@colega colega deleted the past-grace-period branch June 6, 2024 13:56
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