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

Add out-of-order sample support #2187

Merged
merged 9 commits into from
Jun 24, 2022
Merged

Add out-of-order sample support #2187

merged 9 commits into from
Jun 24, 2022

Conversation

codesome
Copy link
Member

What this PR does

This PR adds out of order support to Mimir. #2176 is a prerequisite, and after that is merged, the diff will be smaller after a rebase.

This PR consolidates all the changes from the out-of-order branch (minus vendoring) into a single commit.

Documentation will be added in a separate PR (see this)

I am keeping this as draft until #2176 is merged and this PR is rebased.

Checklist

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

@codesome codesome force-pushed the codesome/merge-ooo branch 2 times, most recently from 8b98d5d to 656a60e Compare June 23, 2022 06:33
CHANGELOG.md Outdated Show resolved Hide resolved
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>

Co-authored-by: Jesus Vazquez <jesus.vazquez@grafana.com>
CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
cmd/mimir/help-all.txt.tmpl Outdated Show resolved Hide resolved
pkg/ingester/ingester.go Outdated Show resolved Hide resolved
pkg/ingester/ingester.go Outdated Show resolved Hide resolved
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.

Thank you. I've left some nit comments, but nothing blocking. I think docs team should take a look at new messages for user (CLI parameters, error messages). (ping @osg-grafana)

pkg/ingester/ingester.go Outdated Show resolved Hide resolved
pkg/ingester/metrics.go Outdated Show resolved Hide resolved
pkg/util/validation/limits.go Outdated Show resolved Hide resolved
pkg/util/validation/limits.go Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
@codesome
Copy link
Member Author

I have fixed the comments and (1) Renamed the exemplar update flag (2) Calling it OutOfOrderTimeWindow now (and not allowance) and reflected it everywhere including the flags. We will port it to mimir-prometheus in near future. Thanks!

Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
Copy link
Member

@jesusvazquez jesusvazquez left a comment

Choose a reason for hiding this comment

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

Looks good to me 🎉 I'd wait for a maintainer approval though!

@codesome codesome force-pushed the codesome/merge-ooo branch 2 times, most recently from afdefc6 to 257d234 Compare June 24, 2022 03:41
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
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.

Left final nits. LGTM! Amazing achievement to get OOO support into Mimir! 🎉

docs/sources/operators-guide/mimir-runbooks/_index.md Outdated Show resolved Hide resolved
pkg/ingester/ingester_test.go Show resolved Hide resolved
pkg/ingester/metrics.go Show resolved Hide resolved
pkg/util/validation/limits.go Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
Copy link
Contributor

@osg-grafana osg-grafana left a comment

Choose a reason for hiding this comment

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

Unblocking with more extensive feedback

Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
@pstibrany pstibrany merged commit adba8ec into main Jun 24, 2022
@pstibrany pstibrany deleted the codesome/merge-ooo branch June 24, 2022 11:49
pkg/storage/tsdb/config.go Show resolved Hide resolved
pkg/util/globalerror/errors.go Show resolved Hide resolved
pkg/util/validation/limits.go Show resolved Hide resolved
pkg/util/validation/limits.go Show resolved Hide resolved
pkg/ingester/metrics_test.go Show resolved Hide resolved
pkg/ingester/metrics_test.go Show resolved Hide resolved
pkg/ingester/ingester.go Show resolved Hide resolved
@@ -85,6 +85,7 @@ const (
instanceIngestionRateTickInterval = time.Second

sampleOutOfOrder = "sample-out-of-order"
sampleTooOld = "sample-too-old"
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we're going to have some confusion between sampleOutOfBounds and sampleTooOld. From an user perspective, they're the same: the same timestamp is too old. What if we merge them?

Copy link
Member Author

Choose a reason for hiding this comment

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

The other error is sample-out-of-bounds or sample-out-of-order. We intentionally changed the error message to have a single on when out of order support is enabled: it is either too old or not too old. What do you suggest here? (the other case was simple where you called out of bound sample as too old)

Copy link
Collaborator

Choose a reason for hiding this comment

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

I see what you mean. Practically, isn't always an "out of bounds" error? Even when you enable the "out of order ingestion" you still have "bounds". I would like to hear @pstibrany opinion too, cause I also see a value in keeping the different cases distinct in metrics. 🤔

Copy link
Member

Choose a reason for hiding this comment

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

I would start with separate metrics so that we can learn more about the feature, but I don't have a strong opinion about it.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, we still have bounds. But the meaning before and after ooo is totally different. "too old" felt more natural. Maybe re-using out-of-bounds is a smarter idea (not too late to make that change btw).

@codesome codesome mentioned this pull request Jun 24, 2022
3 tasks
jesusvazquez added a commit that referenced this pull request Jun 28, 2022
* Add out-of-order sample support

Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>

Co-authored-by: Jesus Vazquez <jesus.vazquez@grafana.com>

* Fix review comments

Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>

* Fix tests

Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>

* Update test to check runtime change of OutOfOrderTimeWindow

Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>

* Fix race in the test

Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>

* Fix Peter's comments

Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>

* Fix CI

Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>

* Fix review comments

Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>

Co-authored-by: Jesus Vazquez <jesus.vazquez@grafana.com>
masonmei pushed a commit to udmire/mimir that referenced this pull request Jul 11, 2022
* Add out-of-order sample support

Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>

Co-authored-by: Jesus Vazquez <jesus.vazquez@grafana.com>

* Fix review comments

Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>

* Fix tests

Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>

* Update test to check runtime change of OutOfOrderTimeWindow

Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>

* Fix race in the test

Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>

* Fix Peter's comments

Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>

* Fix CI

Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>

* Fix review comments

Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>

Co-authored-by: Jesus Vazquez <jesus.vazquez@grafana.com>
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.

None yet

6 participants