Skip to content

Avoid creating duplicate TransportAddress where possible #80690

Closed
@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 Coordination/NetworkHttp and internode communication implementations>bugTeam:Distributed (Obsolete)Meta label for distributed team (obsolete). Replaced by Distributed Indexing/Coordination.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions