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

ASF GitHub Bot commented on ARTEMIS-1790:
-----------------------------------------

Github user gaohoward commented on a diff in the pull request:

    https://github.com/apache/activemq-artemis/pull/1999#discussion_r180155663
  
    --- Diff: 
artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/TopologyMemberImpl.java
 ---
    @@ -105,12 +105,16 @@ public void setUniqueEventID(final long 
uniqueEventID) {
           return connector;
        }
     
    +   /**
    +    * We only need to check if the connection point to the same node,
    +    * don't need to compare the whole params map.
    +    * @param connection The connection to the target node
    +    * @return true if the connection point to the same node
    +    * as this member represents.
    +    */
        @Override
        public boolean isMember(RemotingConnection connection) {
    -      TransportConfiguration connectorConfig = 
connection.getTransportConnection() != null ? 
connection.getTransportConnection().getConnectorConfig() : null;
    -
    -      return isMember(connectorConfig);
    -
    +      return connection.isSameTarget(getConnector().getA(), 
getConnector().getB());
    --- End diff --
    
    The issue here: https://issues.jboss.org/browse/JBEAP-14165
    the issue is that the broker thinks 127.0.0.1 and localhost are different 
hosts when checking isMemeber(), where it just compare the configuration 
parameter map. 


> Improve Topology Member Finding
> -------------------------------
>
>                 Key: ARTEMIS-1790
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-1790
>             Project: ActiveMQ Artemis
>          Issue Type: Improvement
>          Components: Broker
>    Affects Versions: 2.5.0
>            Reporter: Howard Gao
>            Assignee: Howard Gao
>            Priority: Major
>             Fix For: 2.5.1
>
>
> When finding out if a connector belong to a target node it compares the whole 
> parameter map which is not necessary. Also in understanding the connector the 
> best place is to delegate it to the corresponding remoting connection who 
> understands it. (e.g. INVMConnection knows whether the connector belongs to a 
> target node by checking it's serverID only. The netty ones only need to match 
> host and port, and understanding that localhost and 127.0.0.1 are same thing).



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to