-
Notifications
You must be signed in to change notification settings - Fork 1.2k
tcpreuse: fix rcmgr accounting when tcp metrics are enabled #3142
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Yet another interface embedding bug. Running all transport integration tests is a bit overkill, but the rcmgr transport integration test is the only one that tests for this behavior.
cb7c984
to
9c80669
Compare
MarcoPolo
approved these changes
Jan 20, 2025
sukunrt
added a commit
that referenced
this pull request
Jan 21, 2025
Merged
2color
added a commit
that referenced
this pull request
Jan 24, 2025
…bug-nat-port-mapping * origin/marco/bring-go-nat-home: (75 commits) go mod tidy reference internal package for mockgen mod tidy test-plans Make changes to internal nat library ci: move to actions/upload-artifact@v4 (#3152) tcpreuse: fix rcmgr accounting when tcp metrics are enabled (#3142) fix(net/nat): data race problem of `extAddr` (#3140) test: fix failing test (#3141) quicreuse: make it possible to use an application-constructed quic.Transport (#3122) nat: ignore mapping if external port is 0 (#3094) tcpreuse: error on using tcpreuse with pnet (#3129) chore: Update contribution guidelines (#3134) tcp: fix metrics test build directive (#3052) webrtc: upgrade pion/webrtc to v4 (#3098) ci: get back on the main release track of release checker (#3117) webtransport: fix docstring comment for getCurrentBucketStartTime chore: release v0.38.1 (#3114) fix(httpauth): Correctly handle concurrent requests on server (#3111) ci: Install specific protoc version when generating protobufs (#3112) fix(autorelay): Move relayFinder peer disconnect cleanup to separate goroutine (#3105) ...
MarcoPolo
added a commit
that referenced
this pull request
Jul 17, 2025
ConnAs works in a similar way to errors.As. It allows a user to cut through the interface layers and extract a specific type of connection if available. This serves as a sort of escape hatch to allow users to leverage some connection specific feature without having to support that feature for all connections. Getting RTT information is one example. It also allows us, within the library, to get specific types of connections out of the interface box. This would have been useful in the recent changes in tcpreuse. See #3181 and #3142. Getting access to the underlying type can lead to hard to debug issues. For example, if a user mutates connection state on the underlying type, hooks that relied on only mutating that state from the wrapped connection would never be called. It is up to the user to ensure they are using this safely.
MarcoPolo
added a commit
that referenced
this pull request
Jul 17, 2025
ConnAs works in a similar way to errors.As. It allows a user to cut through the interface layers and extract a specific type of connection if available. This serves as a sort of escape hatch to allow users to leverage some connection specific feature without having to support that feature for all connections. Getting RTT information is one example. It also allows us, within the library, to get specific types of connections out of the interface box. This would have been useful in the recent changes in tcpreuse. See #3181 and #3142. Getting access to the underlying type can lead to hard to debug issues. For example, if a user mutates connection state on the underlying type, hooks that relied on only mutating that state from the wrapped connection would never be called. It is up to the user to ensure they are using this safely.
MarcoPolo
added a commit
that referenced
this pull request
Aug 7, 2025
ConnAs works in a similar way to errors.As. It allows a user to cut through the interface layers and extract a specific type of connection if available. This serves as a sort of escape hatch to allow users to leverage some connection specific feature without having to support that feature for all connections. Getting RTT information is one example. It also allows us, within the library, to get specific types of connections out of the interface box. This would have been useful in the recent changes in tcpreuse. See #3181 and #3142. Getting access to the underlying type can lead to hard to debug issues. For example, if a user mutates connection state on the underlying type, hooks that relied on only mutating that state from the wrapped connection would never be called. It is up to the user to ensure they are using this safely.
MarcoPolo
added a commit
that referenced
this pull request
Sep 8, 2025
ConnAs works in a similar way to errors.As. It allows a user to cut through the interface layers and extract a specific type of connection if available. This serves as a sort of escape hatch to allow users to leverage some connection specific feature without having to support that feature for all connections. Getting RTT information is one example. It also allows us, within the library, to get specific types of connections out of the interface box. This would have been useful in the recent changes in tcpreuse. See #3181 and #3142. Getting access to the underlying type can lead to hard to debug issues. For example, if a user mutates connection state on the underlying type, hooks that relied on only mutating that state from the wrapped connection would never be called. It is up to the user to ensure they are using this safely.
MarcoPolo
added a commit
that referenced
this pull request
Sep 8, 2025
ConnAs works in a similar way to errors.As. It allows a user to cut through the interface layers and extract a specific type of connection if available. This serves as a sort of escape hatch to allow users to leverage some connection specific feature without having to support that feature for all connections. Getting RTT information is one example. It also allows us, within the library, to get specific types of connections out of the interface box. This would have been useful in the recent changes in tcpreuse. See #3181 and #3142. Getting access to the underlying type can lead to hard to debug issues. For example, if a user mutates connection state on the underlying type, hooks that relied on only mutating that state from the wrapped connection would never be called. It is up to the user to ensure they are using this safely.
MarcoPolo
added a commit
that referenced
this pull request
Sep 8, 2025
ConnAs works in a similar way to errors.As. It allows a user to cut through the interface layers and extract a specific type of connection if available. This serves as a sort of escape hatch to allow users to leverage some connection specific feature without having to support that feature for all connections. Getting RTT information is one example. It also allows us, within the library, to get specific types of connections out of the interface box. This would have been useful in the recent changes in tcpreuse. See #3181 and #3142. Getting access to the underlying type can lead to hard to debug issues. For example, if a user mutates connection state on the underlying type, hooks that relied on only mutating that state from the wrapped connection would never be called. It is up to the user to ensure they are using this safely.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Yet another interface embedding bug.
Running all transport integration tests is a bit overkill, but the rcmgr transport integration test is the only one that tests for this behavior.