[ 
https://issues.apache.org/jira/browse/CASSANDRA-74?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12731137#action_12731137
 ] 

Jonathan Ellis commented on CASSANDRA-74:
-----------------------------------------

here are the keys to understanding this

in tcpconnection,

                        /* first message received */
                        if (remoteEp_ == null)
                        {             
                            int port = ( pH.isListening_ ) ? 
DatabaseDescriptor.getStoragePort() : EndPoint.randomPort_;
                            remoteEp_ = new EndPoint( 
socketChannel_.socket().getInetAddress().getHostAddress(), port );              
              
                            // put connection into pool if possible
                            pool_ = 
MessagingService.getConnectionPool(localEp_, remoteEp_);                        
    
                            pool_.addToPool(TcpConnection.this);                
            
                        }

and in the message handling,

            boolean listening = 
!message.getFrom().equals(EndPoint.randomLocalEndPoint_);

so it's some weird-ass way of setting itself to a different state.

let's rename them to sentinelLocalEndpoint and sentinelPort.  sound good?

> Random port (5555) hardcoded
> ----------------------------
>
>                 Key: CASSANDRA-74
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-74
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Per Mellqvist
>            Assignee: Chris Goffinet
>            Priority: Minor
>         Attachments: 
> 0001-Removed-hardcoded-port-5555-and-moved-to-storage-con.patch, 
> 0002-Renamed-random-port-to-gossip-port-and-moved-to-stor.patch
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> The EndPoint class contains a "random port" currently hard coded to 5555. The 
> cassandra process will attempt to bind on this port, another process already 
> using 5555 will interfere with this. The port should be configurable.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to