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

[Backport 5.3.9104] streaming: only call flush if writes succeeded #61756

Merged
merged 1 commit into from
Apr 10, 2024

Conversation

sourcegraph-release-bot
Copy link
Collaborator

This is a speculative change to reduce the chances of misuse of the streaming http event writer (SSE). We are seeing panics in attribution search since it is trying to write events once the request has finished.

From the stack traces it seems the http package safely handles calls to Write without panicing but does not do the same for Flush. This change also seems more correct.

Note: this does not address the root cause of the panics, but should make it far less likely to occur.

Test Plan: go test

Part of #60439
Backport 1d07a27 from #61752

This is a speculative change to reduce the chances of misuse of the
streaming http event writer (SSE). We are seeing panics in attribution
search since it is trying to write events once the request has finished.

From the stack traces it seems the http package safely handles calls to
Write without panicing but does not do the same for Flush. This change
also seems more correct.

Note: this does not address the root cause of the panics, but should
make it far less likely to occur.

Test Plan: go test

(cherry picked from commit 1d07a27)
@keegancsmith keegancsmith merged commit b2839a2 into 5.3.9104 Apr 10, 2024
14 of 15 checks passed
@keegancsmith keegancsmith deleted the backport-61752-to-5.3.9104 branch April 10, 2024 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants