Skip to content

Use limiter.NewUnlimitedMemoryConsumptionTracker where possible#14508

Merged
charleskorn merged 1 commit intomainfrom
charleskorn/use-helper-method
Feb 27, 2026
Merged

Use limiter.NewUnlimitedMemoryConsumptionTracker where possible#14508
charleskorn merged 1 commit intomainfrom
charleskorn/use-helper-method

Conversation

@charleskorn
Copy link
Contributor

@charleskorn charleskorn commented Feb 26, 2026

What this PR does

This PR addresses #14377 (comment), simplifying code in tests.

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]. If changelog entry is not needed, please add the changelog-not-needed label to the PR.
  • [n/a] about-versioning.md updated with experimental features.

Note

Low Risk
Test-only refactor that swaps tracker construction helpers without changing production logic; low risk aside from potential test behavior differences if the unlimited helper is misused.

Overview
Updates a broad set of query/streaming PromQL and streaming-reader tests to construct memory trackers via limiter.NewUnlimitedMemoryConsumptionTracker(...) instead of NewMemoryConsumptionTracker(..., 0, nil, ""), making the no-limit but still tracked intent explicit.

Also adjusts limiter tracker context/benchmark tests to use the new helper where appropriate, keeping the remaining limited-memory tests on the explicit constructor.

Written by Cursor Bugbot for commit b3c3663. This will update automatically on new commits. Configure here.

@charleskorn charleskorn added the changelog-not-needed PRs that don't need a CHANGELOG.md entry label Feb 26, 2026
@charleskorn charleskorn marked this pull request as ready for review February 26, 2026 23:58
@charleskorn charleskorn requested a review from a team as a code owner February 26, 2026 23:58
Copy link
Contributor

@lamida lamida left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks 🚀

@charleskorn charleskorn merged commit 2ddd1e5 into main Feb 27, 2026
48 checks passed
@charleskorn charleskorn deleted the charleskorn/use-helper-method branch February 27, 2026 01:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog-not-needed PRs that don't need a CHANGELOG.md entry

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants