Skip to content

Conversation

@fabianfett
Copy link
Member

Motivation

To debug the new HTTPConnectionPool and Connections, it would be great to get a rather complete event story.

Changes

  • Added a number of trace logs
  • Added a nicer debug output for Connection.Key

Result

A better debuggable AHC client.

@fabianfettfabianfett added the 🔨 semver/patch No public API change. label Sep 15, 2021
@fabianfettfabianfett added this to the HTTP/2 support milestone Sep 15, 2021
Comment on lines -134 to -139
didSet {
self.logger.trace("Connection Pool State changed", metadata:[
"key":"\(self.key)",
"state":"\(self._state)",
])
}
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Removed, since it produces way too many logs. We should solely focus on recording the events so that we can replay the finite state machine if needed.

Comment on lines -147 to -149
iflet idleReadTimeout =self.request?.idleReadTimeout {
self.idleReadTimeoutStateMachine =.init(timeAmount: idleReadTimeout)
}
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

This could be removed, since it is already included in the request setter (l. 143). We have tests that ensure that idle read timeouts work as expected. Those continue to succeed.

@fabianfettfabianfett merged commit 7c9662d into swift-server:mainSep 20, 2021
@fabianfettfabianfett deleted the ff-logging branch September 20, 2021 14:23
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🔨 semver/patchNo public API change.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@fabianfett@Lukasa