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

Upgrade mimir-prometheus #10467

Closed
wants to merge 1 commit into from
Closed

Conversation

charleskorn
Copy link
Contributor

What this PR does

This PR upgrades mimir-prometheus to include grafana/mimir-prometheus#820.

I haven't added a changelog entry given this is a minor tracing improvement.

Which issue(s) this PR fixes or relates to

(none)

Checklist

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

@charleskorn charleskorn marked this pull request as ready for review January 17, 2025 02:51
@charleskorn charleskorn requested review from stevesg, grafanabot and a team as code owners January 17, 2025 02:51
@@ -241,7 +250,7 @@ func (c *PostingsForMatchersCache) postingsForMatchersPromise(ctx context.Contex

sizeBytes := int64(len(key) + size.Of(promise))

c.onPromiseExecutionDone(ctx, key, c.timeNow(), sizeBytes, promise.err)
c.onPromiseExecutionDone(ctx, key, ts, sizeBytes, promise.err)
Copy link
Collaborator

Choose a reason for hiding this comment

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

This subtle change could be quite impactful. It was done on purpose reading c.timeNow() at this point, to make the cache TTL lasting longer. The problem is that if you're running a very complex index lookup that takes few seconds, by the time you reach this point, the TTL of 10s may be either already expired or close to expire, effectively invalidating the benefits of the cache.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch, I'll revert this and find another way to do this.

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