Skip to content

Track remote as InetSocketAddress #80691

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

DaveCTurner
Copy link
Contributor

We record the sender of each inbound TransportMessage so that it can
be recorded in the audit trail. Today we use a field of type
TransportAddress which is a wrapper around the underlying
InetSocketAddress that allows us to send the address over the wire. We
create a new wrapper for each inbound message which is a little
wasteful, and also completely unnecessary since we never actually send
it over the wire.

With this commit we skip the wrapping entirely and just use a bare
InetSocketAddress to identify the inbound connection on which the
message was received.

Closes #80690

We record the sender of each inbound `TransportMessage` so that it can
be recorded in the audit trail. Today we use a field of type
`TransportAddress` which is a wrapper around the underlying
`InetSocketAddress` that allows us to send the address over the wire. We
create a new wrapper for each inbound message which is a little
wasteful, and also completely unnecessary since we never actually send
it over the wire.

With this commit we skip the wrapping entirely and just use a bare
`InetSocketAddress` to identify the inbound connection on which the
message was received.

Closes elastic#80690
@DaveCTurner DaveCTurner added :Distributed Coordination/Network Http and internode communication implementations >refactoring v8.1.0 labels Nov 14, 2021
@elasticmachine elasticmachine added the Team:Distributed (Obsolete) Meta label for distributed team (obsolete). Replaced by Distributed Indexing/Coordination. label Nov 14, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-distributed (Team:Distributed)

@DaveCTurner DaveCTurner requested a review from tlrx November 15, 2021 08:39
Copy link
Member

@tlrx tlrx left a comment

Choose a reason for hiding this comment

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

LGTM

@DaveCTurner DaveCTurner merged commit 7117a54 into elastic:master Nov 15, 2021
@DaveCTurner
Copy link
Contributor Author

Thanks both!

@DaveCTurner DaveCTurner deleted the 2021-11-14-unwrap-TransportMessage branch November 15, 2021 09:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Distributed Coordination/Network Http and internode communication implementations >refactoring Team:Distributed (Obsolete) Meta label for distributed team (obsolete). Replaced by Distributed Indexing/Coordination. v8.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Avoid creating duplicate TransportAddress where possible
4 participants