Skip to content

Track remote as InetSocketAddress#80691

Merged
DaveCTurner merged 2 commits intoelastic:masterfrom
DaveCTurner:2021-11-14-unwrap-TransportMessage
Nov 15, 2021
Merged

Track remote as InetSocketAddress#80691
DaveCTurner merged 2 commits intoelastic:masterfrom
DaveCTurner:2021-11-14-unwrap-TransportMessage

Conversation

@DaveCTurner
Copy link
Copy Markdown
Member

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/Network Http and internode communication implementations >refactoring v8.1.0 labels Nov 14, 2021
@elasticmachine elasticmachine added the Team:Distributed Meta label for distributed team. label Nov 14, 2021
@elasticmachine
Copy link
Copy Markdown
Collaborator

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

@DaveCTurner DaveCTurner requested a review from tlrx November 15, 2021 08:39
Copy link
Copy Markdown
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
Copy Markdown
Member 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/Network Http and internode communication implementations >refactoring Team:Distributed Meta label for distributed team. v8.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Avoid creating duplicate TransportAddress where possible

4 participants