Skip to content

Fix nil when ingesterQueryMaxAttempts > 1#7369

Merged
friedrichg merged 3 commits intomasterfrom
fix-nil-check
Mar 25, 2026
Merged

Fix nil when ingesterQueryMaxAttempts > 1#7369
friedrichg merged 3 commits intomasterfrom
fix-nil-check

Conversation

@friedrichg
Copy link
Member

@friedrichg friedrichg commented Mar 23, 2026

What this PR does:

Which issue(s) this PR fixes:
Fixes #7364

Checklist

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

Signed-off-by: Friedrich Gonzalez <1517449+friedrichg@users.noreply.github.com>
@dosubot dosubot bot added the type/tests label Mar 23, 2026
@friedrichg friedrichg changed the title Trigger nil with test Fix nil when ingesterQueryMaxAttempts=2 Mar 23, 2026
Signed-off-by: Friedrich Gonzalez <1517449+friedrichg@users.noreply.github.com>
Signed-off-by: Friedrich Gonzalez <1517449+friedrichg@users.noreply.github.com>
@friedrichg friedrichg changed the title Fix nil when ingesterQueryMaxAttempts=2 Fix nil when ingesterQueryMaxAttempts>1 Mar 23, 2026
@friedrichg friedrichg changed the title Fix nil when ingesterQueryMaxAttempts>1 Fix nil when ingesterQueryMaxAttempts > 1 Mar 23, 2026
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Mar 24, 2026
@friedrichg friedrichg merged commit 3de039f into master Mar 25, 2026
64 of 65 checks passed
@friedrichg friedrichg deleted the fix-nil-check branch March 25, 2026 05:49
friedrichg added a commit that referenced this pull request Mar 25, 2026
When ingesterQueryMaxAttempts > 1 and the context is cancelled before
the backoff loop starts, retries.Ongoing() returns false immediately
and the loop never executes, causing both retry functions to return
(nil, nil). This propagates ctx.Err() from the retry functions
themselves so all callers are protected, and removes the caller-side
nil guard added in #7369. Also aligns the early-return check in
labelsWithRetry to use <= 1 consistently with queryWithRetry.

Signed-off-by: Friedrich Gonzalez <1517449+friedrichg@users.noreply.github.com>
friedrichg added a commit that referenced this pull request Mar 25, 2026
When ingesterQueryMaxAttempts > 1 and the context is cancelled before
the backoff loop starts, retries.Ongoing() returns false immediately
and the loop never executes, causing both retry functions to return
(nil, nil). This propagates ctx.Err() from the retry functions
themselves so all callers are protected, and removes the caller-side
nil guard added in #7369. Also aligns the early-return check in
labelsWithRetry to use <= 1 consistently with queryWithRetry.

Signed-off-by: Friedrich Gonzalez <1517449+friedrichg@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer size/M type/tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Querier crashes for ingester_query_max_attempts > 1

2 participants