Skip to content

Avoid creating duplicate TransportAddress where possible #80690

@DaveCTurner

Description

@DaveCTurner

TransportAddress is a small immutable wrapper around an InetSocketAddress so that they can be sent over the wire. We don't make very many InetSocketAddress objects but we create new wrappers around them on every inbound message and on outbound exceptions:

response.remoteAddress(new TransportAddress(remoteAddress));

request.remoteAddress(new TransportAddress(channel.getRemoteAddress()));

TransportAddress address = new TransportAddress(channel.getLocalAddress());

We should really be re-using the TransportAddress wrapper in these cases.

Metadata

Metadata

Assignees

No one assigned

    Labels

    :Distributed/NetworkHttp and internode communication implementations>bugTeam:DistributedMeta label for distributed team.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions