-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Do not cancel context on Connection.Close #40769
Conversation
This commit removes a call to conn.cancelReqs() that causes the Connection to be unusable after Close() is called, leading to the bug described by elastic#40705.
Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane) |
@@ -326,7 +326,6 @@ func (conn *Connection) Ping() (ESPingData, error) { | |||
// Close closes a connection. | |||
func (conn *Connection) Close() error { | |||
conn.HTTP.CloseIdleConnections() | |||
conn.cancelReqs() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at the diff from #40572, which introduced the issue, it seems that cancelReqs
is only called here, and you ended up removing it as the fix. Does that mean we should just remove the other references to it as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a quick fix to fix our released branches while we work on the actual fix, hence I only removed the line causing the issue and left the rest of the feature. Soon I'll make a PR with tests and a proper fix.
I think the CI failure is unrelated, I'm rerunning the tests. I also enabled auto-merge. |
This commit removes a call to conn.cancelReqs() that causes the Connection to be unusable after Close() is called, leading to the bug described by #40705. (cherry picked from commit b0e4f85) Co-authored-by: Tiago Queiroz <[email protected]>
This commit removes a call to conn.cancelReqs() that causes the Connection to be unusable after Close() is called, leading to the bug described by #40705. (cherry picked from commit b0e4f85) Co-authored-by: Tiago Queiroz <[email protected]>
Proposed commit message
This commit removes a call to conn.cancelReqs() that causes the Connection to be unusable after Close() is called, leading to the bug described by #40705.
Checklist
CHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.Disruptive User Impact
Author's Checklist
How to test this PR locally
Related issues
Use cases
Screenshots
Logs