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

Jon Meredith commented on CASSANDRA-15937:
------------------------------------------

Here's the before & after with the patch.  

{code}
                          current trunk             current w/port              
 patched                     patched w/port

 AllEndpointStates        /127.0.0.3\n...           127.0.0.1:7000\n            
 /127.0.0.1                  /127.0.0.3:7000
 SimpleStates             /127.0.0.1=UP             127.0.0.1:7000=UP           
 /127.0.0.1=UP               /127.0.0.2:7000=UP
 LargeMessagePendingTasks /127.0.0.1=0              127.0.0.1:7000=0            
 /127.0.0.1=0                127.0.0.1:7000=0
 TimeoutsPerHost          /127.0.0.1=0              127.0.0.1:7000=0            
 /127.0.0.1=0                /127.0.0.1:7000=0
 SchemaVersions          {...=[127.0.0.1,...]}      {...=[127.0.0.1:7000,...]   
 {...=[127.0.0.1,...]}       {...=[127.0.0.1:7000,...]}

 TokenToEndpointMap      -92...8=127.0.0.1          -92..8=127.0.0.1:7000       
 -92..08=127.0.0.1           -92..08=127.0.0.1:7000
 EndpointToHostId        127.0.0.1=e06...7e         127.0.0.1:7000=e0..7e       
 127.0.0.1=e04..5            127.0.0.1:7000=e0..b5
 HostIdToEndpoint        e06..7e=127.0.0.1          e06..7e=127.0.0.1:7000      
 e0..b5=127.0.0.1            e0..b5=127.0.0.1:7000
 LoadMap                 127.0.0.1:7000=106.08 KiB  127.0.0.1=106.08 KiB        
 127.0.0.1=106.12 KiB        127.0.0.1:7000=106.12 KiB
 LiveNodes               127.0.0.1                  127.0.0.1:7000              
 127.0.0.1                   127.0.0.1:7000
 Ownership               /127.0.0.1=0.0             127.0.0.1:7000=0.0          
 /127.0.0.1=0.333333         /127.0.0.1:7000=0.333333

{code}

I checked the name resolution also works by adding some additional aliases to 
/etc/hosts

{code}
127.0.0.1       localhost local0-i1
255.255.255.255 broadcasthost
::1             localhost
127.0.0.2 local0-i2
127.0.0.3 local0-i3
{core}

Which gives
{code}
     "SimpleStates": "{local0-i3/127.0.0.3=UP, localhost/127.0.0.1=UP, 
local0-i2/127.0.0.2=UP}",
      "SimpleStatesWithPort": "{localhost/127.0.0.1:7000=UP, 
local0-i2/127.0.0.2:7000=UP, local0-i3/127.0.0.3:7000=UP}",
{code}
 
If a reviewer is feeling adventurous and wants to test with IPv6, you can 
create a cluster with

{code}
# macOS aliases, YMMV
sudo ifconfig lo0 inet6 alias 0:0:0:0:0:0:0:1
sudo ifconfig lo0 inet6 alias 0:0:0:0:0:0:0:2
sudo ifconfig lo0 inet6 alias 0:0:0:0:0:0:0:3

ccm create -n3 --install-dir=. --ip-format="::%d" c15937ipv6
{code}

> JMX output inconsistencies from CASSANDRA-7544 
> storage-port-configurable-per-node
> ---------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-15937
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-15937
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Observability/JMX
>            Reporter: Jon Meredith
>            Assignee: Jon Meredith
>            Priority: Normal
>             Fix For: 4.0-beta
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> CASSANDRA-7544 introduced changes to allow the storage port number to be 
> configured per-node. As part of that work it introduces new MBeans for 
> MessagingService, FailureDetector providing new 'WithPort' versions that 
> include the new port information, however there are some mistakes and 
> inconsistencies.
> {code:java}
>                            3.11.6                trunk                  trunk 
> w/Port          Notes
>   
>  AllEndpointStates        /127.0.0.1\n...       /127.0.0.3\n...        
> 127.0.0.3:7000\n        (trunk /w port different)
>  SimpleStates             /127.0.0.2=UP         /127.0.0.2=UP          
> 127.0.0.3:7000=UP       (trunk /w port different)
>  LargeMessagePendingTasks /127.0.0.1=0          /127.0.0.1=0           
> 127.0.0.3:7000=0        (trunk /w port different)
>  TimeoutsPerHost          127.0.0.1=0           /127.0.0.1=0           
> 127.0.0.3:7000=0        3.0/3.11.6 & trunk differ.
>  BackPressurePerHost      127.0.0.1=Infinity    /127.0.0.2=Infinity    
> /127.0.0.2=Infinity     3.11 & trunk differ, missing port number for 
> BackPressurePerHostWithPort
>  SchemaVersions          {...=[127.0.0.1,...]} {...=[127.0.0.1,...]}  
> {...=[127.0.0.1:7000,...]
>   
>  TokenToEndpointMap      {-92...8=127.0.0.1,   -92...8=127.0.0.1      
> -92..8=127.0.0.1:7000
>  HostIdMap               127.0.0.1=1ee..6f0af  127.0.0.1=e06...7e     MISSING 
>                  Deprecated for EndpointToHostId
>  EndpointToHostId        127.0.0.1=1ee..6f0a   127.0.0.1=e06...7e     
> 127.0.0.1:7000=e0..7e
>  HostIdToEndpoint        1ee..6f0a=127.0.0.1   e06..7e=127.0.0.1      
> e06..7e=127.0.0.1:7000
>  LoadMap                 127.0.0.1=185.01 KiB  127.0.0.1:7000=106.08 KiB  
> 127.0.0.1=106.08 Ki  LoadMap and LoadMapWithPort are flipped.
>  LiveNodes               127.0.0.1             127.0.0.1              
> 127.0.0.1:7000
>  Ownership               /127.0.0.1=0.333333   /127.0.0.1=0.333333    
> 127.0.0.1:7000=0.333333
>  Scores                  /127.0.0.1=0.0        /127.0.0.1=0.0         
> 127.0.0.1:7000=0.0
>   {code}
>  
>  Proposed changes
>   
>  1) AllEndpointStats, SimpleStates, Connection message tracking, 
> TimeoutsPerHost - include the host/ip:port in the WithPort version
> 2) Add port number to BackPressurePerHostWithPort
> 3) Correct LoadMap to omit port / LoadMapWithPort to include port
> 4) Ownership - update with port to host/ip:port version
> 5) Scores - update with port to host/ip:port version
>   
>   
>  Additionally while dumping out all of the JMX info with `sjk mxdump`
>   
> 6) DynamicEndpointSnitch.getScoresWithPort now returns an InetAddressAndPort 
> which should just be a String
> 7) ClientMetrics.clientsByProtocolVersion returns a Guava Immutable map
> 8) StorageService.getIdealConsistencyLevel fails if none set (as we try and 
> call ConsistencyLevel.toString on a null pointer).



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

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org

Reply via email to