cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jonathan Ellis (JIRA)" <j...@apache.org>
Subject [jira] [Issue Comment Edited] (CASSANDRA-2177) OPP + NTS + RF=2 reports wrong getRangeToEndpointMap
Date Tue, 19 Apr 2011 18:06:05 GMT

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

Jonathan Ellis edited comment on CASSANDRA-2177 at 4/19/11 6:06 PM:
--------------------------------------------------------------------

Here is what I did:

{noformat}
ccm create 2177 -p OrderPreservingPartitioner
ccm add node2 -i 127.0.0.2 -j 7200 -s -n N
ccm add node1 -i 127.0.0.1 -j 7100 -s -n a
ccm add node3 -i 127.0.0.3 -j 7300 -s -n z

create keyspace bar with placement_strategy=NetworkTopologyStrategy and strategy_options=[{datacenter1:
2}];

Address         Status State   Load            Owns    Token                             
         
                                                       z                                 
         
127.0.0.2       Up     Normal  50.65 KB        33.33%  N                                 
         
127.0.0.1       Up     Normal  50.65 KB        33.33%  a                                 
         
127.0.0.3       Up     Normal  50.65 KB        33.33%  z                                 
         
{noformat}

(Note that capital letters sort before lower-case ones.)

getRangeToEndpointMap(bar) is (a,z]:[127.0.0.3, 127.0.0.2], (z,N]:[127.0.0.2, 127.0.0.1],
(N,a]:[127.0.0.1, 127.0.0.3]

all nodes are represented twice.

      was (Author: jbellis):
    Here is what I did:

{noformat}
ccm create 2177 -p OrderPreservingPartitioner
ccm add node2 -i 127.0.0.2 -j 7200 -s -n N
ccm add node1 -i 127.0.0.1 -j 7100 -s -n a
ccm add node3 -i 127.0.0.3 -j 7300 -s -n z

create keyspace bar with placement_strategy=NetworkTopologyStrategy and strategy_options=[{datacenter1:
2}];

Address         Status State   Load            Owns    Token                             
         
                                                       z                                 
         
127.0.0.2       Up     Normal  50.65 KB        33.33%  N                                 
         
127.0.0.1       Up     Normal  50.65 KB        33.33%  a                                 
         
127.0.0.3       Up     Normal  50.65 KB        33.33%  z                                 
         
{noformat}

(Note that capital letters sort before lower-case ones.)

getRangeToEndpointMap(bar) is (a,z]:[127.0.0.3, 127.0.0.2],(z,N]:[127.0.0.2, 127.0.0.1],(N,a]:[127.0.0.1,
127.0.0.3]

all nodes are represented twice.
  
> OPP + NTS + RF=2 reports wrong getRangeToEndpointMap
> ----------------------------------------------------
>
>                 Key: CASSANDRA-2177
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2177
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Mike Bulman
>
> OPP, 3 node cluster, RackInferringSnitch.
> Ring:
> [root@mb541 apache-cassandra-0.7.1]# bin/nodetool -h localhost ring
> Address         Status State   Load            Owns    Token                        
              
>                                                        zzz                          
              
> 1.2.3.4 Up     Normal  42.48 KB        33.33%  aaa                                  
      
> 1.2.3.5 Up     Normal  42.39 KB        33.33%  rDwPSSIKSaXEwaaV                     
      
> 1.2.3.6  Up     Normal  42.5 KB        33.33%  zzz         
> getRangeToEndPointMap for KS using NTS with {'2':2} replication returns:
> {
> ('aaa', 'zzz'): ('1.2.3.6', '1.2.3.5'),
> ('zzz', 'NVOt7oNr1UcCzCEU'): ('1.2.3.5', '1.2.3.6'), 
> ('NVOt7oNr1UcCzCEU', 'aaa'): ('1.2.3.4', '1.2.3.6')
> }
> node '4' is only represented once.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message