Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

[Backport 5.3.9104] symbols: avoid spamming handleParseRequest on context cancelation#61771

Merged
jdpleiness merged 2 commits into
5.3.9104from
backport-61732-to-5.3.9104
Apr 12, 2024
Merged

[Backport 5.3.9104] symbols: avoid spamming handleParseRequest on context cancelation#61771
jdpleiness merged 2 commits into
5.3.9104from
backport-61732-to-5.3.9104

Conversation

@sourcegraph-release-bot

Copy link
Copy Markdown
Collaborator

Understanding how Parse works (and its callers) with respect to goroutines and channels is a sure path to the asylum. This is a short term fix around how it behaves when the context is canceled.

From what I can tell we can have a large number of parse requests go through handleParseRequest even once the context has been canceled, leading to large amounts of logging of errors which all amount to context canceled. This is a short term fix which drains the channel if we know we are just gonna fail our call to handleParseRequest.

Test Plan: go test. Didn't manual test, but the code change is minor enough that I trust it (famous last words).

Backport a0b74fb from #61732

…1732)

Understanding how Parse works (and its callers) with respect to
goroutines and channels is a sure path to the asylum. This is a short
term fix around how it behaves when the context is canceled.

From what I can tell we can have a large number of parse requests go
through handleParseRequest even once the context has been canceled,
leading to large amounts of logging of errors which all amount to
context canceled. This is a short term fix which drains the channel if
we know we are just gonna fail our call to handleParseRequest.

Test Plan: go test. Didn't manual test, but the code change is minor
enough that I trust it (famous last words).

(cherry picked from commit a0b74fb)
@keegancsmith

Copy link
Copy Markdown
Member

@jdpleiness mind merging in? I don't have merge rights for release branches anymore.

@jdpleiness jdpleiness merged commit 1a6e758 into 5.3.9104 Apr 12, 2024
@jdpleiness jdpleiness deleted the backport-61732-to-5.3.9104 branch April 12, 2024 13:44
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants