You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Chris Trahman (JIRA)" <ji...@apache.org> on 2011/05/20 22:57:47 UTC

[jira] [Created] (CASSANDRA-2678) Incorrect NetworkTopolgyStrategy Options on upgrade from 0.7.5

Incorrect NetworkTopolgyStrategy Options on upgrade from 0.7.5
--------------------------------------------------------------

                 Key: CASSANDRA-2678
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2678
             Project: Cassandra
          Issue Type: Bug
          Components: Core
    Affects Versions: 0.8.0
         Environment: 10 node cluster, RHELL6.0
0.7.5, Single DC using NTS and RF=3 (DC1:3) -> upgraded to 0.8.0-rc1. 
            Reporter: Chris Trahman
            Priority: Minor


After an upgrade from 0.7.5 to 0.8.0-rc1 on a 10 node, single DC ring configured with NTS, operations fail due to an inability to reach replicas in the 'second datacenter':

ERROR [pool-2-thread-8] 2011-05-17 12:15:23,145 Cassandra.java (line 3294) Internal error processing insert
java.lang.IllegalStateException: datacenter (replication_factor) has no more endpoints, (3) replicas still needed
        at org.apache.cassandra.locator.NetworkTopologyStrategy.calculateNaturalEndpoints(NetworkTopologyStrategy.java:118)
        at org.apache.cassandra.locator.AbstractReplicationStrategy.getNaturalEndpoints(AbstractReplicationStrategy.java:100)
        at org.apache.cassandra.service.StorageService.getNaturalEndpoints(StorageService.java:1611)
        at org.apache.cassandra.service.StorageService.getNaturalEndpoints(StorageService.java:1599)
        at org.apache.cassandra.service.StorageProxy.getWriteEndpoints(StorageProxy.java:217)
        at org.apache.cassandra.service.StorageProxy.performWrite(StorageProxy.java:202)
        at org.apache.cassandra.service.StorageProxy.mutate(StorageProxy.java:154)
        at org.apache.cassandra.thrift.CassandraServer.doInsert(CassandraServer.java:557)
        at org.apache.cassandra.thrift.CassandraServer.internal_insert(CassandraServer.java:434)
        at org.apache.cassandra.thrift.CassandraServer.insert(CassandraServer.java:442)
        at org.apache.cassandra.thrift.Cassandra$Processor$insert.process(Cassandra.java:3286)
        at org.apache.cassandra.thrift.Cassandra$Processor.process(Cassandra.java:2889)
        at org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:187)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
        at java.lang.Thread.run(Thread.java:636)
DEBUG [ScheduledTasks:1] 2011-05-17 12:15:33,975 StorageLoadBalancer.java (line 334) Disseminating load info ...

On checking the keyspace definition with cassandra-cli, it appears that 0.8.0-rc1 considered the 'replication_factor:3' configuration in the older version as a DC name in part of the DC replication strategy:

  Replication Strategy: org.apache.cassandra.locator.NetworkTopologyStrategy
    Options: [replication_factor:3, DC1:3]

I attempted to remove replication_factor as a DC using the 'update keyspace' command, but it would persist.  I was able to remove the DC1:3 and use:

update keyspace MyKeyspace with strategy_options=[{replication_factor:3}];

then changed the topology properties file, renamed DC1 to replication_factor, and it worked - so there is a workaround. 

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

[jira] [Updated] (CASSANDRA-2678) Incorrect NetworkTopolgyStrategy Options on upgrade from 0.7.5

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-2678?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jonathan Ellis updated CASSANDRA-2678:
--------------------------------------

    Attachment: 2678.txt

patch to only add r_f to strategy_options for simplestrategy and oldnetworktopologystrategy

> Incorrect NetworkTopolgyStrategy Options on upgrade from 0.7.5
> --------------------------------------------------------------
>
>                 Key: CASSANDRA-2678
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2678
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 0.8.0 beta 2
>         Environment: 10 node cluster, RHELL6.0
> 0.7.5, Single DC using NTS and RF=3 (DC1:3) -> upgraded to 0.8.0-rc1. 
>            Reporter: Chris Trahman
>            Assignee: Jonathan Ellis
>            Priority: Minor
>             Fix For: 0.8.0
>
>         Attachments: 2678.txt
>
>
> After an upgrade from 0.7.5 to 0.8.0-rc1 on a 10 node, single DC ring configured with NTS, operations fail due to an inability to reach replicas in the 'second datacenter':
> ERROR [pool-2-thread-8] 2011-05-17 12:15:23,145 Cassandra.java (line 3294) Internal error processing insert
> java.lang.IllegalStateException: datacenter (replication_factor) has no more endpoints, (3) replicas still needed
>         at org.apache.cassandra.locator.NetworkTopologyStrategy.calculateNaturalEndpoints(NetworkTopologyStrategy.java:118)
>         at org.apache.cassandra.locator.AbstractReplicationStrategy.getNaturalEndpoints(AbstractReplicationStrategy.java:100)
>         at org.apache.cassandra.service.StorageService.getNaturalEndpoints(StorageService.java:1611)
>         at org.apache.cassandra.service.StorageService.getNaturalEndpoints(StorageService.java:1599)
>         at org.apache.cassandra.service.StorageProxy.getWriteEndpoints(StorageProxy.java:217)
>         at org.apache.cassandra.service.StorageProxy.performWrite(StorageProxy.java:202)
>         at org.apache.cassandra.service.StorageProxy.mutate(StorageProxy.java:154)
>         at org.apache.cassandra.thrift.CassandraServer.doInsert(CassandraServer.java:557)
>         at org.apache.cassandra.thrift.CassandraServer.internal_insert(CassandraServer.java:434)
>         at org.apache.cassandra.thrift.CassandraServer.insert(CassandraServer.java:442)
>         at org.apache.cassandra.thrift.Cassandra$Processor$insert.process(Cassandra.java:3286)
>         at org.apache.cassandra.thrift.Cassandra$Processor.process(Cassandra.java:2889)
>         at org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:187)
>         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
>         at java.lang.Thread.run(Thread.java:636)
> DEBUG [ScheduledTasks:1] 2011-05-17 12:15:33,975 StorageLoadBalancer.java (line 334) Disseminating load info ...
> On checking the keyspace definition with cassandra-cli, it appears that 0.8.0-rc1 considered the 'replication_factor:3' configuration in the older version as a DC name in part of the DC replication strategy:
>   Replication Strategy: org.apache.cassandra.locator.NetworkTopologyStrategy
>     Options: [replication_factor:3, DC1:3]
> I attempted to remove replication_factor as a DC using the 'update keyspace' command, but it would persist.  I was able to remove the DC1:3 and use:
> update keyspace MyKeyspace with strategy_options=[{replication_factor:3}];
> then changed the topology properties file, renamed DC1 to replication_factor, and it worked - so there is a workaround. 

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

[jira] [Updated] (CASSANDRA-2678) Incorrect NetworkTopolgyStrategy Options on upgrade from 0.7.5

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-2678?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jonathan Ellis updated CASSANDRA-2678:
--------------------------------------

    Reviewer: jhermes  (was: thobbs)

> Incorrect NetworkTopolgyStrategy Options on upgrade from 0.7.5
> --------------------------------------------------------------
>
>                 Key: CASSANDRA-2678
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2678
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 0.8.0 beta 2
>         Environment: 10 node cluster, RHELL6.0
> 0.7.5, Single DC using NTS and RF=3 (DC1:3) -> upgraded to 0.8.0-rc1. 
>            Reporter: Chris Trahman
>            Assignee: Jonathan Ellis
>            Priority: Minor
>             Fix For: 0.8.0
>
>         Attachments: 2678.txt
>
>
> After an upgrade from 0.7.5 to 0.8.0-rc1 on a 10 node, single DC ring configured with NTS, operations fail due to an inability to reach replicas in the 'second datacenter':
> ERROR [pool-2-thread-8] 2011-05-17 12:15:23,145 Cassandra.java (line 3294) Internal error processing insert
> java.lang.IllegalStateException: datacenter (replication_factor) has no more endpoints, (3) replicas still needed
>         at org.apache.cassandra.locator.NetworkTopologyStrategy.calculateNaturalEndpoints(NetworkTopologyStrategy.java:118)
>         at org.apache.cassandra.locator.AbstractReplicationStrategy.getNaturalEndpoints(AbstractReplicationStrategy.java:100)
>         at org.apache.cassandra.service.StorageService.getNaturalEndpoints(StorageService.java:1611)
>         at org.apache.cassandra.service.StorageService.getNaturalEndpoints(StorageService.java:1599)
>         at org.apache.cassandra.service.StorageProxy.getWriteEndpoints(StorageProxy.java:217)
>         at org.apache.cassandra.service.StorageProxy.performWrite(StorageProxy.java:202)
>         at org.apache.cassandra.service.StorageProxy.mutate(StorageProxy.java:154)
>         at org.apache.cassandra.thrift.CassandraServer.doInsert(CassandraServer.java:557)
>         at org.apache.cassandra.thrift.CassandraServer.internal_insert(CassandraServer.java:434)
>         at org.apache.cassandra.thrift.CassandraServer.insert(CassandraServer.java:442)
>         at org.apache.cassandra.thrift.Cassandra$Processor$insert.process(Cassandra.java:3286)
>         at org.apache.cassandra.thrift.Cassandra$Processor.process(Cassandra.java:2889)
>         at org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:187)
>         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
>         at java.lang.Thread.run(Thread.java:636)
> DEBUG [ScheduledTasks:1] 2011-05-17 12:15:33,975 StorageLoadBalancer.java (line 334) Disseminating load info ...
> On checking the keyspace definition with cassandra-cli, it appears that 0.8.0-rc1 considered the 'replication_factor:3' configuration in the older version as a DC name in part of the DC replication strategy:
>   Replication Strategy: org.apache.cassandra.locator.NetworkTopologyStrategy
>     Options: [replication_factor:3, DC1:3]
> I attempted to remove replication_factor as a DC using the 'update keyspace' command, but it would persist.  I was able to remove the DC1:3 and use:
> update keyspace MyKeyspace with strategy_options=[{replication_factor:3}];
> then changed the topology properties file, renamed DC1 to replication_factor, and it worked - so there is a workaround. 

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

[jira] [Updated] (CASSANDRA-2678) Incorrect NetworkTopolgyStrategy Options on upgrade from 0.7.5

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-2678?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jonathan Ellis updated CASSANDRA-2678:
--------------------------------------

    Attachment: 2678-v2.txt

bq. It's much clearer to not ternary on the value

you need to though, to convert int -> Integer.  Otherwise it will autobox the 0 default value, instead of the correct null.  (maybeAdd wasn't checking for null though -- v2 corrects this.)

bq. more importantly that ks_def.strategy_class is a CharSequence

no, this is a Thrift object so it's a String.

> Incorrect NetworkTopolgyStrategy Options on upgrade from 0.7.5
> --------------------------------------------------------------
>
>                 Key: CASSANDRA-2678
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2678
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 0.8.0 beta 2
>         Environment: 10 node cluster, RHELL6.0
> 0.7.5, Single DC using NTS and RF=3 (DC1:3) -> upgraded to 0.8.0-rc1. 
>            Reporter: Chris Trahman
>            Assignee: Jonathan Ellis
>            Priority: Minor
>             Fix For: 0.8.0
>
>         Attachments: 2678-v2.txt, 2678.txt
>
>
> After an upgrade from 0.7.5 to 0.8.0-rc1 on a 10 node, single DC ring configured with NTS, operations fail due to an inability to reach replicas in the 'second datacenter':
> ERROR [pool-2-thread-8] 2011-05-17 12:15:23,145 Cassandra.java (line 3294) Internal error processing insert
> java.lang.IllegalStateException: datacenter (replication_factor) has no more endpoints, (3) replicas still needed
>         at org.apache.cassandra.locator.NetworkTopologyStrategy.calculateNaturalEndpoints(NetworkTopologyStrategy.java:118)
>         at org.apache.cassandra.locator.AbstractReplicationStrategy.getNaturalEndpoints(AbstractReplicationStrategy.java:100)
>         at org.apache.cassandra.service.StorageService.getNaturalEndpoints(StorageService.java:1611)
>         at org.apache.cassandra.service.StorageService.getNaturalEndpoints(StorageService.java:1599)
>         at org.apache.cassandra.service.StorageProxy.getWriteEndpoints(StorageProxy.java:217)
>         at org.apache.cassandra.service.StorageProxy.performWrite(StorageProxy.java:202)
>         at org.apache.cassandra.service.StorageProxy.mutate(StorageProxy.java:154)
>         at org.apache.cassandra.thrift.CassandraServer.doInsert(CassandraServer.java:557)
>         at org.apache.cassandra.thrift.CassandraServer.internal_insert(CassandraServer.java:434)
>         at org.apache.cassandra.thrift.CassandraServer.insert(CassandraServer.java:442)
>         at org.apache.cassandra.thrift.Cassandra$Processor$insert.process(Cassandra.java:3286)
>         at org.apache.cassandra.thrift.Cassandra$Processor.process(Cassandra.java:2889)
>         at org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:187)
>         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
>         at java.lang.Thread.run(Thread.java:636)
> DEBUG [ScheduledTasks:1] 2011-05-17 12:15:33,975 StorageLoadBalancer.java (line 334) Disseminating load info ...
> On checking the keyspace definition with cassandra-cli, it appears that 0.8.0-rc1 considered the 'replication_factor:3' configuration in the older version as a DC name in part of the DC replication strategy:
>   Replication Strategy: org.apache.cassandra.locator.NetworkTopologyStrategy
>     Options: [replication_factor:3, DC1:3]
> I attempted to remove replication_factor as a DC using the 'update keyspace' command, but it would persist.  I was able to remove the DC1:3 and use:
> update keyspace MyKeyspace with strategy_options=[{replication_factor:3}];
> then changed the topology properties file, renamed DC1 to replication_factor, and it worked - so there is a workaround. 

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

[jira] [Commented] (CASSANDRA-2678) Incorrect NetworkTopolgyStrategy Options on upgrade from 0.7.5

Posted by "Jon Hermes (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2678?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13038011#comment-13038011 ] 

Jon Hermes commented on CASSANDRA-2678:
---------------------------------------

KSMetaData:55
{noformat}
maybeAddReplicationFactor(options, ks_def.strategy_class, ks_def.isSetReplication_factor() ? ks_def.replication_factor : null);
{noformat}
...needs to be
{noformat}
maybeAddReplicationFactor(options, ks_def.strategy_class.toString(), ks_def.replication_factor);
{noformat}

It's much clearer to not ternary on the value (since you're not going to use it in the `ne SS || ONTS` case), and more importantly that ks_def.strategy_class is a CharSequence, so you'll hit an error if you expect it to be a String in maybe...().

Otherwise straightforward.

> Incorrect NetworkTopolgyStrategy Options on upgrade from 0.7.5
> --------------------------------------------------------------
>
>                 Key: CASSANDRA-2678
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2678
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 0.8.0 beta 2
>         Environment: 10 node cluster, RHELL6.0
> 0.7.5, Single DC using NTS and RF=3 (DC1:3) -> upgraded to 0.8.0-rc1. 
>            Reporter: Chris Trahman
>            Assignee: Jonathan Ellis
>            Priority: Minor
>             Fix For: 0.8.0
>
>         Attachments: 2678.txt
>
>
> After an upgrade from 0.7.5 to 0.8.0-rc1 on a 10 node, single DC ring configured with NTS, operations fail due to an inability to reach replicas in the 'second datacenter':
> ERROR [pool-2-thread-8] 2011-05-17 12:15:23,145 Cassandra.java (line 3294) Internal error processing insert
> java.lang.IllegalStateException: datacenter (replication_factor) has no more endpoints, (3) replicas still needed
>         at org.apache.cassandra.locator.NetworkTopologyStrategy.calculateNaturalEndpoints(NetworkTopologyStrategy.java:118)
>         at org.apache.cassandra.locator.AbstractReplicationStrategy.getNaturalEndpoints(AbstractReplicationStrategy.java:100)
>         at org.apache.cassandra.service.StorageService.getNaturalEndpoints(StorageService.java:1611)
>         at org.apache.cassandra.service.StorageService.getNaturalEndpoints(StorageService.java:1599)
>         at org.apache.cassandra.service.StorageProxy.getWriteEndpoints(StorageProxy.java:217)
>         at org.apache.cassandra.service.StorageProxy.performWrite(StorageProxy.java:202)
>         at org.apache.cassandra.service.StorageProxy.mutate(StorageProxy.java:154)
>         at org.apache.cassandra.thrift.CassandraServer.doInsert(CassandraServer.java:557)
>         at org.apache.cassandra.thrift.CassandraServer.internal_insert(CassandraServer.java:434)
>         at org.apache.cassandra.thrift.CassandraServer.insert(CassandraServer.java:442)
>         at org.apache.cassandra.thrift.Cassandra$Processor$insert.process(Cassandra.java:3286)
>         at org.apache.cassandra.thrift.Cassandra$Processor.process(Cassandra.java:2889)
>         at org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:187)
>         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
>         at java.lang.Thread.run(Thread.java:636)
> DEBUG [ScheduledTasks:1] 2011-05-17 12:15:33,975 StorageLoadBalancer.java (line 334) Disseminating load info ...
> On checking the keyspace definition with cassandra-cli, it appears that 0.8.0-rc1 considered the 'replication_factor:3' configuration in the older version as a DC name in part of the DC replication strategy:
>   Replication Strategy: org.apache.cassandra.locator.NetworkTopologyStrategy
>     Options: [replication_factor:3, DC1:3]
> I attempted to remove replication_factor as a DC using the 'update keyspace' command, but it would persist.  I was able to remove the DC1:3 and use:
> update keyspace MyKeyspace with strategy_options=[{replication_factor:3}];
> then changed the topology properties file, renamed DC1 to replication_factor, and it worked - so there is a workaround. 

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

[jira] [Updated] (CASSANDRA-2678) Incorrect NetworkTopolgyStrategy Options on upgrade from 0.7.5

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-2678?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jonathan Ellis updated CASSANDRA-2678:
--------------------------------------

    Affects Version/s:     (was: 0.8.0)
                       0.8.0 beta 2
        Fix Version/s: 0.8.0
             Assignee: Jonathan Ellis

> Incorrect NetworkTopolgyStrategy Options on upgrade from 0.7.5
> --------------------------------------------------------------
>
>                 Key: CASSANDRA-2678
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2678
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 0.8.0 beta 2
>         Environment: 10 node cluster, RHELL6.0
> 0.7.5, Single DC using NTS and RF=3 (DC1:3) -> upgraded to 0.8.0-rc1. 
>            Reporter: Chris Trahman
>            Assignee: Jonathan Ellis
>            Priority: Minor
>             Fix For: 0.8.0
>
>
> After an upgrade from 0.7.5 to 0.8.0-rc1 on a 10 node, single DC ring configured with NTS, operations fail due to an inability to reach replicas in the 'second datacenter':
> ERROR [pool-2-thread-8] 2011-05-17 12:15:23,145 Cassandra.java (line 3294) Internal error processing insert
> java.lang.IllegalStateException: datacenter (replication_factor) has no more endpoints, (3) replicas still needed
>         at org.apache.cassandra.locator.NetworkTopologyStrategy.calculateNaturalEndpoints(NetworkTopologyStrategy.java:118)
>         at org.apache.cassandra.locator.AbstractReplicationStrategy.getNaturalEndpoints(AbstractReplicationStrategy.java:100)
>         at org.apache.cassandra.service.StorageService.getNaturalEndpoints(StorageService.java:1611)
>         at org.apache.cassandra.service.StorageService.getNaturalEndpoints(StorageService.java:1599)
>         at org.apache.cassandra.service.StorageProxy.getWriteEndpoints(StorageProxy.java:217)
>         at org.apache.cassandra.service.StorageProxy.performWrite(StorageProxy.java:202)
>         at org.apache.cassandra.service.StorageProxy.mutate(StorageProxy.java:154)
>         at org.apache.cassandra.thrift.CassandraServer.doInsert(CassandraServer.java:557)
>         at org.apache.cassandra.thrift.CassandraServer.internal_insert(CassandraServer.java:434)
>         at org.apache.cassandra.thrift.CassandraServer.insert(CassandraServer.java:442)
>         at org.apache.cassandra.thrift.Cassandra$Processor$insert.process(Cassandra.java:3286)
>         at org.apache.cassandra.thrift.Cassandra$Processor.process(Cassandra.java:2889)
>         at org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:187)
>         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
>         at java.lang.Thread.run(Thread.java:636)
> DEBUG [ScheduledTasks:1] 2011-05-17 12:15:33,975 StorageLoadBalancer.java (line 334) Disseminating load info ...
> On checking the keyspace definition with cassandra-cli, it appears that 0.8.0-rc1 considered the 'replication_factor:3' configuration in the older version as a DC name in part of the DC replication strategy:
>   Replication Strategy: org.apache.cassandra.locator.NetworkTopologyStrategy
>     Options: [replication_factor:3, DC1:3]
> I attempted to remove replication_factor as a DC using the 'update keyspace' command, but it would persist.  I was able to remove the DC1:3 and use:
> update keyspace MyKeyspace with strategy_options=[{replication_factor:3}];
> then changed the topology properties file, renamed DC1 to replication_factor, and it worked - so there is a workaround. 

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

[jira] [Commented] (CASSANDRA-2678) Incorrect NetworkTopolgyStrategy Options on upgrade from 0.7.5

Posted by "Jon Hermes (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2678?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13038130#comment-13038130 ] 

Jon Hermes commented on CASSANDRA-2678:
---------------------------------------

bq. As above, it can't (since it is an int not an Integer), but it can be "unset."
I meant the null that we pass in line 55 because it was 'unset'.

I agree with the latter choice. We could doubly validate here and catch the error just a _little_ bit faster than waiting for the class to validate, but it's not a big deal. Assuming the duplicate code was removed, +1.

> Incorrect NetworkTopolgyStrategy Options on upgrade from 0.7.5
> --------------------------------------------------------------
>
>                 Key: CASSANDRA-2678
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2678
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 0.8.0 beta 2
>         Environment: 10 node cluster, RHELL6.0
> 0.7.5, Single DC using NTS and RF=3 (DC1:3) -> upgraded to 0.8.0-rc1. 
>            Reporter: Chris Trahman
>            Assignee: Jonathan Ellis
>            Priority: Minor
>             Fix For: 0.8.0
>
>         Attachments: 2678-v2.txt, 2678.txt
>
>
> After an upgrade from 0.7.5 to 0.8.0-rc1 on a 10 node, single DC ring configured with NTS, operations fail due to an inability to reach replicas in the 'second datacenter':
> ERROR [pool-2-thread-8] 2011-05-17 12:15:23,145 Cassandra.java (line 3294) Internal error processing insert
> java.lang.IllegalStateException: datacenter (replication_factor) has no more endpoints, (3) replicas still needed
>         at org.apache.cassandra.locator.NetworkTopologyStrategy.calculateNaturalEndpoints(NetworkTopologyStrategy.java:118)
>         at org.apache.cassandra.locator.AbstractReplicationStrategy.getNaturalEndpoints(AbstractReplicationStrategy.java:100)
>         at org.apache.cassandra.service.StorageService.getNaturalEndpoints(StorageService.java:1611)
>         at org.apache.cassandra.service.StorageService.getNaturalEndpoints(StorageService.java:1599)
>         at org.apache.cassandra.service.StorageProxy.getWriteEndpoints(StorageProxy.java:217)
>         at org.apache.cassandra.service.StorageProxy.performWrite(StorageProxy.java:202)
>         at org.apache.cassandra.service.StorageProxy.mutate(StorageProxy.java:154)
>         at org.apache.cassandra.thrift.CassandraServer.doInsert(CassandraServer.java:557)
>         at org.apache.cassandra.thrift.CassandraServer.internal_insert(CassandraServer.java:434)
>         at org.apache.cassandra.thrift.CassandraServer.insert(CassandraServer.java:442)
>         at org.apache.cassandra.thrift.Cassandra$Processor$insert.process(Cassandra.java:3286)
>         at org.apache.cassandra.thrift.Cassandra$Processor.process(Cassandra.java:2889)
>         at org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:187)
>         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
>         at java.lang.Thread.run(Thread.java:636)
> DEBUG [ScheduledTasks:1] 2011-05-17 12:15:33,975 StorageLoadBalancer.java (line 334) Disseminating load info ...
> On checking the keyspace definition with cassandra-cli, it appears that 0.8.0-rc1 considered the 'replication_factor:3' configuration in the older version as a DC name in part of the DC replication strategy:
>   Replication Strategy: org.apache.cassandra.locator.NetworkTopologyStrategy
>     Options: [replication_factor:3, DC1:3]
> I attempted to remove replication_factor as a DC using the 'update keyspace' command, but it would persist.  I was able to remove the DC1:3 and use:
> update keyspace MyKeyspace with strategy_options=[{replication_factor:3}];
> then changed the topology properties file, renamed DC1 to replication_factor, and it worked - so there is a workaround. 

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

[jira] [Commented] (CASSANDRA-2678) Incorrect NetworkTopolgyStrategy Options on upgrade from 0.7.5

Posted by "Jon Hermes (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2678?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13038034#comment-13038034 ] 

Jon Hermes commented on CASSANDRA-2678:
---------------------------------------

If the def has a null value for RF (as it correctly should post-RF change), should we verify that 'replication_factor' already exists in the map inside of maybe() and do nothing?

Line 55 is unnecessary/duped, and line 142 looks like it might also need to pass null, otherwise it's just avro/thriftisms.

> Incorrect NetworkTopolgyStrategy Options on upgrade from 0.7.5
> --------------------------------------------------------------
>
>                 Key: CASSANDRA-2678
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2678
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 0.8.0 beta 2
>         Environment: 10 node cluster, RHELL6.0
> 0.7.5, Single DC using NTS and RF=3 (DC1:3) -> upgraded to 0.8.0-rc1. 
>            Reporter: Chris Trahman
>            Assignee: Jonathan Ellis
>            Priority: Minor
>             Fix For: 0.8.0
>
>         Attachments: 2678-v2.txt, 2678.txt
>
>
> After an upgrade from 0.7.5 to 0.8.0-rc1 on a 10 node, single DC ring configured with NTS, operations fail due to an inability to reach replicas in the 'second datacenter':
> ERROR [pool-2-thread-8] 2011-05-17 12:15:23,145 Cassandra.java (line 3294) Internal error processing insert
> java.lang.IllegalStateException: datacenter (replication_factor) has no more endpoints, (3) replicas still needed
>         at org.apache.cassandra.locator.NetworkTopologyStrategy.calculateNaturalEndpoints(NetworkTopologyStrategy.java:118)
>         at org.apache.cassandra.locator.AbstractReplicationStrategy.getNaturalEndpoints(AbstractReplicationStrategy.java:100)
>         at org.apache.cassandra.service.StorageService.getNaturalEndpoints(StorageService.java:1611)
>         at org.apache.cassandra.service.StorageService.getNaturalEndpoints(StorageService.java:1599)
>         at org.apache.cassandra.service.StorageProxy.getWriteEndpoints(StorageProxy.java:217)
>         at org.apache.cassandra.service.StorageProxy.performWrite(StorageProxy.java:202)
>         at org.apache.cassandra.service.StorageProxy.mutate(StorageProxy.java:154)
>         at org.apache.cassandra.thrift.CassandraServer.doInsert(CassandraServer.java:557)
>         at org.apache.cassandra.thrift.CassandraServer.internal_insert(CassandraServer.java:434)
>         at org.apache.cassandra.thrift.CassandraServer.insert(CassandraServer.java:442)
>         at org.apache.cassandra.thrift.Cassandra$Processor$insert.process(Cassandra.java:3286)
>         at org.apache.cassandra.thrift.Cassandra$Processor.process(Cassandra.java:2889)
>         at org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:187)
>         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
>         at java.lang.Thread.run(Thread.java:636)
> DEBUG [ScheduledTasks:1] 2011-05-17 12:15:33,975 StorageLoadBalancer.java (line 334) Disseminating load info ...
> On checking the keyspace definition with cassandra-cli, it appears that 0.8.0-rc1 considered the 'replication_factor:3' configuration in the older version as a DC name in part of the DC replication strategy:
>   Replication Strategy: org.apache.cassandra.locator.NetworkTopologyStrategy
>     Options: [replication_factor:3, DC1:3]
> I attempted to remove replication_factor as a DC using the 'update keyspace' command, but it would persist.  I was able to remove the DC1:3 and use:
> update keyspace MyKeyspace with strategy_options=[{replication_factor:3}];
> then changed the topology properties file, renamed DC1 to replication_factor, and it worked - so there is a workaround. 

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

[jira] [Commented] (CASSANDRA-2678) Incorrect NetworkTopolgyStrategy Options on upgrade from 0.7.5

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2678?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13038126#comment-13038126 ] 

Jonathan Ellis commented on CASSANDRA-2678:
-------------------------------------------

bq. If the def has a null value for RF (as it correctly should post-RF change)

As above, it can't (since it is an int not an Integer), but it can be "unset."

bq. should we verify that 'replication_factor' already exists in the map inside of maybe() and do nothing?

No, the strategy class is responsible for actually validating its options.  We're just trying to stick a thin compatibility layer in here so people can continue using 0.7 clients w/ 0.8 server temporarily.

> Incorrect NetworkTopolgyStrategy Options on upgrade from 0.7.5
> --------------------------------------------------------------
>
>                 Key: CASSANDRA-2678
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2678
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 0.8.0 beta 2
>         Environment: 10 node cluster, RHELL6.0
> 0.7.5, Single DC using NTS and RF=3 (DC1:3) -> upgraded to 0.8.0-rc1. 
>            Reporter: Chris Trahman
>            Assignee: Jonathan Ellis
>            Priority: Minor
>             Fix For: 0.8.0
>
>         Attachments: 2678-v2.txt, 2678.txt
>
>
> After an upgrade from 0.7.5 to 0.8.0-rc1 on a 10 node, single DC ring configured with NTS, operations fail due to an inability to reach replicas in the 'second datacenter':
> ERROR [pool-2-thread-8] 2011-05-17 12:15:23,145 Cassandra.java (line 3294) Internal error processing insert
> java.lang.IllegalStateException: datacenter (replication_factor) has no more endpoints, (3) replicas still needed
>         at org.apache.cassandra.locator.NetworkTopologyStrategy.calculateNaturalEndpoints(NetworkTopologyStrategy.java:118)
>         at org.apache.cassandra.locator.AbstractReplicationStrategy.getNaturalEndpoints(AbstractReplicationStrategy.java:100)
>         at org.apache.cassandra.service.StorageService.getNaturalEndpoints(StorageService.java:1611)
>         at org.apache.cassandra.service.StorageService.getNaturalEndpoints(StorageService.java:1599)
>         at org.apache.cassandra.service.StorageProxy.getWriteEndpoints(StorageProxy.java:217)
>         at org.apache.cassandra.service.StorageProxy.performWrite(StorageProxy.java:202)
>         at org.apache.cassandra.service.StorageProxy.mutate(StorageProxy.java:154)
>         at org.apache.cassandra.thrift.CassandraServer.doInsert(CassandraServer.java:557)
>         at org.apache.cassandra.thrift.CassandraServer.internal_insert(CassandraServer.java:434)
>         at org.apache.cassandra.thrift.CassandraServer.insert(CassandraServer.java:442)
>         at org.apache.cassandra.thrift.Cassandra$Processor$insert.process(Cassandra.java:3286)
>         at org.apache.cassandra.thrift.Cassandra$Processor.process(Cassandra.java:2889)
>         at org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:187)
>         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
>         at java.lang.Thread.run(Thread.java:636)
> DEBUG [ScheduledTasks:1] 2011-05-17 12:15:33,975 StorageLoadBalancer.java (line 334) Disseminating load info ...
> On checking the keyspace definition with cassandra-cli, it appears that 0.8.0-rc1 considered the 'replication_factor:3' configuration in the older version as a DC name in part of the DC replication strategy:
>   Replication Strategy: org.apache.cassandra.locator.NetworkTopologyStrategy
>     Options: [replication_factor:3, DC1:3]
> I attempted to remove replication_factor as a DC using the 'update keyspace' command, but it would persist.  I was able to remove the DC1:3 and use:
> update keyspace MyKeyspace with strategy_options=[{replication_factor:3}];
> then changed the topology properties file, renamed DC1 to replication_factor, and it worked - so there is a workaround. 

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