You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@geode.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2021/10/13 17:29:00 UTC

[jira] [Commented] (GEODE-7808) standardize on use of LocatorAddress/HostAddress for connection formation

    [ https://issues.apache.org/jira/browse/GEODE-7808?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17428372#comment-17428372 ] 

ASF subversion and git services commented on GEODE-7808:
--------------------------------------------------------

Commit b39958fafa8690bb978710018a6ecf2bc56244f3 in geode's branch refs/heads/develop from Aaron Lindsey
[ https://gitbox.apache.org/repos/asf?p=geode.git;h=b39958f ]

GEODE-9666: Avoid caching InetSocketAddress (#6938)

The changes for GEODE-9139 changed the behavior of
org.apache.geode.distributed.internal.tcpserver.HostAndPort to
permanently cache the internal InetSocketAddress once it has tried one
time to resolve the address. This undoes part of the fix introduced by
GEODE-7808, in which HostAndPort was created as a way to hold an
unresolved hostname.

The issue is that the cached InetSocketAddress may contain a stale or
unresolved address which will be returned by getSocketInetAddress for
the lifetime of the HostAndPort/InetSocketWrapper object. This prevents
the address from being resolved correctly after changes in DNS records.
(Such changes are common in cloud environments.)

This commit removes the cached internal InetSocketAddress from
InetSocketWrapper so that getSocketInetAddress will try to resolve the
address each time it is called with an unresolved address.

> standardize on use of LocatorAddress/HostAddress for connection formation
> -------------------------------------------------------------------------
>
>                 Key: GEODE-7808
>                 URL: https://issues.apache.org/jira/browse/GEODE-7808
>             Project: Geode
>          Issue Type: Improvement
>          Components: membership, messaging
>            Reporter: Bruce J Schuchardt
>            Assignee: Bruce J Schuchardt
>            Priority: Major
>             Fix For: 1.13.0
>
>          Time Spent: 7h 40m
>  Remaining Estimate: 0h
>
> We currently use InetAddress and InetSocketAddress in many places to identify locators, servers and peers.  Some work has been done in the past couple of years to reduce the use of these in order to accommodate changes in IP addresses due to various causes.  The class LocatorAddress was created to help with this and it is able to hold a host name without resolving it until that resolution is needed to form a tcp/ip connection.
> These days we are seeing more and more movement into cloud computing and the need to accommodate IP address changes is becoming a bigger issue.  To that end we would like to  change our primary client/server and WAN communication interfaces to stop taking InetAddresses and InetSocketAddresses as arguments and, instead, take something like a LocatorAddress that can hold an unresolved hostname that our communication implementations will resolve when needed.
> To that end we should also remove the hostname->inetaddress cache in SocketCreator and rely on the operating system's DNS cache.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)