You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Thor Carpenter (JIRA)" <ji...@apache.org> on 2010/12/30 23:59:46 UTC
[jira] Created: (CASSANDRA-1924) Broken keyspace strategy_option
with zero replicas
Broken keyspace strategy_option with zero replicas
--------------------------------------------------
Key: CASSANDRA-1924
URL: https://issues.apache.org/jira/browse/CASSANDRA-1924
Project: Cassandra
Issue Type: Bug
Components: Core
Affects Versions: 0.7.0 rc 3, 0.7.0 rc 2, 0.7.0 rc 1, 0.7 beta 3, 0.7 beta 2, 0.7 beta 1
Reporter: Thor Carpenter
Priority: Minor
When a keyspace is defined that has strategy options specifying zero replicas should be place in a datacenter (e.g. DCX:0), an assert is violated for any insert and LOCAL_QUORUM reads fail. I'm not sure if the issue is that there are no nodes in DCX or that I'm saying DCX shouldn't get any replicas, or a combination of the two.
The broken keyspace:
create keyspace KeyspaceDC1 with
replication_factor = 1 and
placement_strategy = 'org.apache.cassandra.locator.NetworkTopologyStrategy' and
strategy_options = [{DC1:1, DC2:0}];
The fixed keyspace:
create keyspace KeyspaceDC1 with
replication_factor = 1 and
placement_strategy = 'org.apache.cassandra.locator.NetworkTopologyStrategy' and
strategy_options = [{DC1:1}];
To reproduce:
* Install the 0.7rc3 rpm on a single node in "DC1".
* In cassandra.yaml set initial_token = 1 and specify PropertyFileSnitch.
* cassandra-topology.properties:
10.5.64.26=DC1:R1
default=DC2:R1
* Schema loaded via cassandra-cli:
create keyspace KeyspaceDC1 with
replication_factor = 1 and
placement_strategy = 'org.apache.cassandra.locator.NetworkTopologyStrategy' and
strategy_options = [{DC1:1, DC2:0}];
use KeyspaceDC1;
create column family TestCF with
column_type = 'Standard' and
comparator = 'BytesType' and
keys_cached = 200000 and
rows_cached = 2000 and
gc_grace = 0 and
read_repair_chance = 0.0;
* In cassandra-cli execute the following:
[default@unknown] use KeyspaceDC1;
Authenticated to keyspace: KeyspaceDC1
[default@KeyspaceDC1] set TestCF['some key']['some col'] = 'some value';
Internal error processing insert
* If you have asserts enabled, check system.log where you should find the assertion error:
DEBUG [pool-1-thread-3] 2010-12-29 12:10:38,897 CassandraServer.java (line 362) insert
ERROR [pool-1-thread-3] 2010-12-29 12:10:38,906 Cassandra.java (line 2960) Internal error processing insert
java.lang.AssertionError
at org.apache.cassandra.locator.TokenMetadata.firstTokenIndex(TokenMetadata.java:392)
at org.apache.cassandra.locator.TokenMetadata.ringIterator(TokenMetadata.java:417)
at org.apache.cassandra.locator.NetworkTopologyStrategy.calculateNaturalEndpoints(NetworkTopologyStrategy.java:95)
at org.apache.cassandra.locator.AbstractReplicationStrategy.getNaturalEndpoints(AbstractReplicationStrategy.java:99)
at org.apache.cassandra.service.StorageService.getNaturalEndpoints(StorageService.java:1411)
at org.apache.cassandra.service.StorageService.getNaturalEndpoints(StorageService.java:1394)
at org.apache.cassandra.service.StorageProxy.mutate(StorageProxy.java:109)
at org.apache.cassandra.thrift.CassandraServer.doInsert(CassandraServer.java:442)
at org.apache.cassandra.thrift.CassandraServer.insert(CassandraServer.java:379)
at org.apache.cassandra.thrift.Cassandra$Processor$insert.process(Cassandra.java:2952)
at org.apache.cassandra.thrift.Cassandra$Processor.process(Cassandra.java:2555)
at org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:167)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
* If you don't have asserts enabled, you should find that no errors are logged but LOCAL_QUORUM reads cause TimedOutExceptions on the client.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (CASSANDRA-1924) Broken keyspace strategy_option
with zero replicas
Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-1924?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jonathan Ellis updated CASSANDRA-1924:
--------------------------------------
Remaining Estimate: 2h
Original Estimate: 2h
> Broken keyspace strategy_option with zero replicas
> --------------------------------------------------
>
> Key: CASSANDRA-1924
> URL: https://issues.apache.org/jira/browse/CASSANDRA-1924
> Project: Cassandra
> Issue Type: Bug
> Components: Core
> Affects Versions: 0.7.0
> Reporter: Thor Carpenter
> Assignee: Sylvain Lebresne
> Priority: Minor
> Fix For: 0.7.4
>
> Attachments: 0001-Ring-iterator-empty-list-test.patch, 0002-NetworkTopologyStrategy-test-and-small-optim.patch
>
> Original Estimate: 2h
> Remaining Estimate: 2h
>
> When a keyspace is defined that has strategy options specifying zero replicas should be place in a datacenter (e.g. DCX:0), an assert is violated for any insert and LOCAL_QUORUM reads fail. I'm not sure if the issue is that there are no nodes in DCX or that I'm saying DCX shouldn't get any replicas, or a combination of the two.
> The broken keyspace:
> create keyspace KeyspaceDC1 with
> replication_factor = 1 and
> placement_strategy = 'org.apache.cassandra.locator.NetworkTopologyStrategy' and
> strategy_options = [{DC1:1, DC2:0}];
> The fixed keyspace:
> create keyspace KeyspaceDC1 with
> replication_factor = 1 and
> placement_strategy = 'org.apache.cassandra.locator.NetworkTopologyStrategy' and
> strategy_options = [{DC1:1}];
> To reproduce:
> * Install the 0.7rc3 rpm on a single node in "DC1".
> * In cassandra.yaml set initial_token = 1 and specify PropertyFileSnitch.
> * cassandra-topology.properties:
> 10.5.64.26=DC1:R1
> default=DC2:R1
> * Schema loaded via cassandra-cli:
> create keyspace KeyspaceDC1 with
> replication_factor = 1 and
> placement_strategy = 'org.apache.cassandra.locator.NetworkTopologyStrategy' and
> strategy_options = [{DC1:1, DC2:0}];
> use KeyspaceDC1;
> create column family TestCF with
> column_type = 'Standard' and
> comparator = 'BytesType' and
> keys_cached = 200000 and
> rows_cached = 2000 and
> gc_grace = 0 and
> read_repair_chance = 0.0;
> * In cassandra-cli execute the following:
> [default@unknown] use KeyspaceDC1;
> Authenticated to keyspace: KeyspaceDC1
> [default@KeyspaceDC1] set TestCF['some key']['some col'] = 'some value';
> Internal error processing insert
> * If you have asserts enabled, check system.log where you should find the assertion error:
> DEBUG [pool-1-thread-3] 2010-12-29 12:10:38,897 CassandraServer.java (line 362) insert
> ERROR [pool-1-thread-3] 2010-12-29 12:10:38,906 Cassandra.java (line 2960) Internal error processing insert
> java.lang.AssertionError
> at org.apache.cassandra.locator.TokenMetadata.firstTokenIndex(TokenMetadata.java:392)
> at org.apache.cassandra.locator.TokenMetadata.ringIterator(TokenMetadata.java:417)
> at org.apache.cassandra.locator.NetworkTopologyStrategy.calculateNaturalEndpoints(NetworkTopologyStrategy.java:95)
> at org.apache.cassandra.locator.AbstractReplicationStrategy.getNaturalEndpoints(AbstractReplicationStrategy.java:99)
> at org.apache.cassandra.service.StorageService.getNaturalEndpoints(StorageService.java:1411)
> at org.apache.cassandra.service.StorageService.getNaturalEndpoints(StorageService.java:1394)
> at org.apache.cassandra.service.StorageProxy.mutate(StorageProxy.java:109)
> at org.apache.cassandra.thrift.CassandraServer.doInsert(CassandraServer.java:442)
> at org.apache.cassandra.thrift.CassandraServer.insert(CassandraServer.java:379)
> at org.apache.cassandra.thrift.Cassandra$Processor$insert.process(Cassandra.java:2952)
> at org.apache.cassandra.thrift.Cassandra$Processor.process(Cassandra.java:2555)
> at org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:167)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> at java.lang.Thread.run(Thread.java:619)
> * If you don't have asserts enabled, you should find that no errors are logged but LOCAL_QUORUM reads cause TimedOutExceptions on the client.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (CASSANDRA-1924) Broken keyspace strategy_option
with zero replicas
Posted by "Sylvain Lebresne (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-1924?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sylvain Lebresne updated CASSANDRA-1924:
----------------------------------------
Attachment: 0002-NetworkTopologyStrategy-test-and-small-optim.patch
0001-Ring-iterator-empty-list-test.patch
Indeed ringIterator() shouldn't fail when the argument token list is empty.
Attaching patch to fix this with a unit test.
The second patch attached adds a more high level unit test that tests the problem at the level of NetworkTopologyStrategy (while the first patch has a ringIterator test). It also include a tiny optimisation for NetworkTopologyStrategy that skip unnecessary steps when the number of replicas in the DC is 0. This optimisation would hide the actual problem so that's why it's attached separately.
> Broken keyspace strategy_option with zero replicas
> --------------------------------------------------
>
> Key: CASSANDRA-1924
> URL: https://issues.apache.org/jira/browse/CASSANDRA-1924
> Project: Cassandra
> Issue Type: Bug
> Components: Core
> Affects Versions: 0.7.0
> Reporter: Thor Carpenter
> Assignee: Sylvain Lebresne
> Priority: Minor
> Fix For: 0.7.4
>
> Attachments: 0001-Ring-iterator-empty-list-test.patch, 0002-NetworkTopologyStrategy-test-and-small-optim.patch
>
>
> When a keyspace is defined that has strategy options specifying zero replicas should be place in a datacenter (e.g. DCX:0), an assert is violated for any insert and LOCAL_QUORUM reads fail. I'm not sure if the issue is that there are no nodes in DCX or that I'm saying DCX shouldn't get any replicas, or a combination of the two.
> The broken keyspace:
> create keyspace KeyspaceDC1 with
> replication_factor = 1 and
> placement_strategy = 'org.apache.cassandra.locator.NetworkTopologyStrategy' and
> strategy_options = [{DC1:1, DC2:0}];
> The fixed keyspace:
> create keyspace KeyspaceDC1 with
> replication_factor = 1 and
> placement_strategy = 'org.apache.cassandra.locator.NetworkTopologyStrategy' and
> strategy_options = [{DC1:1}];
> To reproduce:
> * Install the 0.7rc3 rpm on a single node in "DC1".
> * In cassandra.yaml set initial_token = 1 and specify PropertyFileSnitch.
> * cassandra-topology.properties:
> 10.5.64.26=DC1:R1
> default=DC2:R1
> * Schema loaded via cassandra-cli:
> create keyspace KeyspaceDC1 with
> replication_factor = 1 and
> placement_strategy = 'org.apache.cassandra.locator.NetworkTopologyStrategy' and
> strategy_options = [{DC1:1, DC2:0}];
> use KeyspaceDC1;
> create column family TestCF with
> column_type = 'Standard' and
> comparator = 'BytesType' and
> keys_cached = 200000 and
> rows_cached = 2000 and
> gc_grace = 0 and
> read_repair_chance = 0.0;
> * In cassandra-cli execute the following:
> [default@unknown] use KeyspaceDC1;
> Authenticated to keyspace: KeyspaceDC1
> [default@KeyspaceDC1] set TestCF['some key']['some col'] = 'some value';
> Internal error processing insert
> * If you have asserts enabled, check system.log where you should find the assertion error:
> DEBUG [pool-1-thread-3] 2010-12-29 12:10:38,897 CassandraServer.java (line 362) insert
> ERROR [pool-1-thread-3] 2010-12-29 12:10:38,906 Cassandra.java (line 2960) Internal error processing insert
> java.lang.AssertionError
> at org.apache.cassandra.locator.TokenMetadata.firstTokenIndex(TokenMetadata.java:392)
> at org.apache.cassandra.locator.TokenMetadata.ringIterator(TokenMetadata.java:417)
> at org.apache.cassandra.locator.NetworkTopologyStrategy.calculateNaturalEndpoints(NetworkTopologyStrategy.java:95)
> at org.apache.cassandra.locator.AbstractReplicationStrategy.getNaturalEndpoints(AbstractReplicationStrategy.java:99)
> at org.apache.cassandra.service.StorageService.getNaturalEndpoints(StorageService.java:1411)
> at org.apache.cassandra.service.StorageService.getNaturalEndpoints(StorageService.java:1394)
> at org.apache.cassandra.service.StorageProxy.mutate(StorageProxy.java:109)
> at org.apache.cassandra.thrift.CassandraServer.doInsert(CassandraServer.java:442)
> at org.apache.cassandra.thrift.CassandraServer.insert(CassandraServer.java:379)
> at org.apache.cassandra.thrift.Cassandra$Processor$insert.process(Cassandra.java:2952)
> at org.apache.cassandra.thrift.Cassandra$Processor.process(Cassandra.java:2555)
> at org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:167)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> at java.lang.Thread.run(Thread.java:619)
> * If you don't have asserts enabled, you should find that no errors are logged but LOCAL_QUORUM reads cause TimedOutExceptions on the client.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (CASSANDRA-1924) Broken keyspace strategy_option
with zero replicas
Posted by "Tommy Tynja (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-1924?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13005002#comment-13005002 ]
Tommy Tynja commented on CASSANDRA-1924:
----------------------------------------
So the AssertionError occurs in TokenMetadata.firstTokenIndex where the token ring is expected to have a size greater than 0. A discovery I made is that the TokenMetadata.ringIterator method which makes the call to firstTokenIndex, also expects the ring to be non-empty if the includeMin parameter is true:
final boolean insertMin = (includeMin && !ring.get(0).equals(StorageService.getPartitioner().getMinimumToken())) ? true : false;
If the includeMin parameter is true and the ring is empty, it would raise a java.lang.IndexOutOfBoundsException: Index: 0, Size: 0. However, the method only seems to be called with includeMin == true from StorageProxy.getRestrictedRanges. As in the case of this issue, it is called from NetworkTopologyStrategy with a includeMin == false, thus failing at the assertion in TokenMetadata.firstTokenIndex since there are no TokenMetadata tokens present.
> Broken keyspace strategy_option with zero replicas
> --------------------------------------------------
>
> Key: CASSANDRA-1924
> URL: https://issues.apache.org/jira/browse/CASSANDRA-1924
> Project: Cassandra
> Issue Type: Bug
> Components: Core
> Affects Versions: 0.7 beta 1, 0.7 beta 2, 0.7 beta 3, 0.7.0 rc 1, 0.7.0 rc 2, 0.7.0 rc 3
> Reporter: Thor Carpenter
> Priority: Minor
>
> When a keyspace is defined that has strategy options specifying zero replicas should be place in a datacenter (e.g. DCX:0), an assert is violated for any insert and LOCAL_QUORUM reads fail. I'm not sure if the issue is that there are no nodes in DCX or that I'm saying DCX shouldn't get any replicas, or a combination of the two.
> The broken keyspace:
> create keyspace KeyspaceDC1 with
> replication_factor = 1 and
> placement_strategy = 'org.apache.cassandra.locator.NetworkTopologyStrategy' and
> strategy_options = [{DC1:1, DC2:0}];
> The fixed keyspace:
> create keyspace KeyspaceDC1 with
> replication_factor = 1 and
> placement_strategy = 'org.apache.cassandra.locator.NetworkTopologyStrategy' and
> strategy_options = [{DC1:1}];
> To reproduce:
> * Install the 0.7rc3 rpm on a single node in "DC1".
> * In cassandra.yaml set initial_token = 1 and specify PropertyFileSnitch.
> * cassandra-topology.properties:
> 10.5.64.26=DC1:R1
> default=DC2:R1
> * Schema loaded via cassandra-cli:
> create keyspace KeyspaceDC1 with
> replication_factor = 1 and
> placement_strategy = 'org.apache.cassandra.locator.NetworkTopologyStrategy' and
> strategy_options = [{DC1:1, DC2:0}];
> use KeyspaceDC1;
> create column family TestCF with
> column_type = 'Standard' and
> comparator = 'BytesType' and
> keys_cached = 200000 and
> rows_cached = 2000 and
> gc_grace = 0 and
> read_repair_chance = 0.0;
> * In cassandra-cli execute the following:
> [default@unknown] use KeyspaceDC1;
> Authenticated to keyspace: KeyspaceDC1
> [default@KeyspaceDC1] set TestCF['some key']['some col'] = 'some value';
> Internal error processing insert
> * If you have asserts enabled, check system.log where you should find the assertion error:
> DEBUG [pool-1-thread-3] 2010-12-29 12:10:38,897 CassandraServer.java (line 362) insert
> ERROR [pool-1-thread-3] 2010-12-29 12:10:38,906 Cassandra.java (line 2960) Internal error processing insert
> java.lang.AssertionError
> at org.apache.cassandra.locator.TokenMetadata.firstTokenIndex(TokenMetadata.java:392)
> at org.apache.cassandra.locator.TokenMetadata.ringIterator(TokenMetadata.java:417)
> at org.apache.cassandra.locator.NetworkTopologyStrategy.calculateNaturalEndpoints(NetworkTopologyStrategy.java:95)
> at org.apache.cassandra.locator.AbstractReplicationStrategy.getNaturalEndpoints(AbstractReplicationStrategy.java:99)
> at org.apache.cassandra.service.StorageService.getNaturalEndpoints(StorageService.java:1411)
> at org.apache.cassandra.service.StorageService.getNaturalEndpoints(StorageService.java:1394)
> at org.apache.cassandra.service.StorageProxy.mutate(StorageProxy.java:109)
> at org.apache.cassandra.thrift.CassandraServer.doInsert(CassandraServer.java:442)
> at org.apache.cassandra.thrift.CassandraServer.insert(CassandraServer.java:379)
> at org.apache.cassandra.thrift.Cassandra$Processor$insert.process(Cassandra.java:2952)
> at org.apache.cassandra.thrift.Cassandra$Processor.process(Cassandra.java:2555)
> at org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:167)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> at java.lang.Thread.run(Thread.java:619)
> * If you don't have asserts enabled, you should find that no errors are logged but LOCAL_QUORUM reads cause TimedOutExceptions on the client.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (CASSANDRA-1924) Broken keyspace strategy_option
with zero replicas
Posted by "Hudson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-1924?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13005889#comment-13005889 ]
Hudson commented on CASSANDRA-1924:
-----------------------------------
Integrated in Cassandra-0.7 #375 (See [https://hudson.apache.org/hudson/job/Cassandra-0.7/375/])
allow zero replicas in a NTSdatacenter
patch by slebresne; reviewed by jbellis for CASSANDRA-1924
> Broken keyspace strategy_option with zero replicas
> --------------------------------------------------
>
> Key: CASSANDRA-1924
> URL: https://issues.apache.org/jira/browse/CASSANDRA-1924
> Project: Cassandra
> Issue Type: Bug
> Components: Core
> Affects Versions: 0.7.0
> Reporter: Thor Carpenter
> Assignee: Sylvain Lebresne
> Priority: Minor
> Fix For: 0.7.4
>
> Attachments: 0001-Ring-iterator-empty-list-test.patch, 0002-NetworkTopologyStrategy-test-and-small-optim.patch
>
>
> When a keyspace is defined that has strategy options specifying zero replicas should be place in a datacenter (e.g. DCX:0), an assert is violated for any insert and LOCAL_QUORUM reads fail. I'm not sure if the issue is that there are no nodes in DCX or that I'm saying DCX shouldn't get any replicas, or a combination of the two.
> The broken keyspace:
> create keyspace KeyspaceDC1 with
> replication_factor = 1 and
> placement_strategy = 'org.apache.cassandra.locator.NetworkTopologyStrategy' and
> strategy_options = [{DC1:1, DC2:0}];
> The fixed keyspace:
> create keyspace KeyspaceDC1 with
> replication_factor = 1 and
> placement_strategy = 'org.apache.cassandra.locator.NetworkTopologyStrategy' and
> strategy_options = [{DC1:1}];
> To reproduce:
> * Install the 0.7rc3 rpm on a single node in "DC1".
> * In cassandra.yaml set initial_token = 1 and specify PropertyFileSnitch.
> * cassandra-topology.properties:
> 10.5.64.26=DC1:R1
> default=DC2:R1
> * Schema loaded via cassandra-cli:
> create keyspace KeyspaceDC1 with
> replication_factor = 1 and
> placement_strategy = 'org.apache.cassandra.locator.NetworkTopologyStrategy' and
> strategy_options = [{DC1:1, DC2:0}];
> use KeyspaceDC1;
> create column family TestCF with
> column_type = 'Standard' and
> comparator = 'BytesType' and
> keys_cached = 200000 and
> rows_cached = 2000 and
> gc_grace = 0 and
> read_repair_chance = 0.0;
> * In cassandra-cli execute the following:
> [default@unknown] use KeyspaceDC1;
> Authenticated to keyspace: KeyspaceDC1
> [default@KeyspaceDC1] set TestCF['some key']['some col'] = 'some value';
> Internal error processing insert
> * If you have asserts enabled, check system.log where you should find the assertion error:
> DEBUG [pool-1-thread-3] 2010-12-29 12:10:38,897 CassandraServer.java (line 362) insert
> ERROR [pool-1-thread-3] 2010-12-29 12:10:38,906 Cassandra.java (line 2960) Internal error processing insert
> java.lang.AssertionError
> at org.apache.cassandra.locator.TokenMetadata.firstTokenIndex(TokenMetadata.java:392)
> at org.apache.cassandra.locator.TokenMetadata.ringIterator(TokenMetadata.java:417)
> at org.apache.cassandra.locator.NetworkTopologyStrategy.calculateNaturalEndpoints(NetworkTopologyStrategy.java:95)
> at org.apache.cassandra.locator.AbstractReplicationStrategy.getNaturalEndpoints(AbstractReplicationStrategy.java:99)
> at org.apache.cassandra.service.StorageService.getNaturalEndpoints(StorageService.java:1411)
> at org.apache.cassandra.service.StorageService.getNaturalEndpoints(StorageService.java:1394)
> at org.apache.cassandra.service.StorageProxy.mutate(StorageProxy.java:109)
> at org.apache.cassandra.thrift.CassandraServer.doInsert(CassandraServer.java:442)
> at org.apache.cassandra.thrift.CassandraServer.insert(CassandraServer.java:379)
> at org.apache.cassandra.thrift.Cassandra$Processor$insert.process(Cassandra.java:2952)
> at org.apache.cassandra.thrift.Cassandra$Processor.process(Cassandra.java:2555)
> at org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:167)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> at java.lang.Thread.run(Thread.java:619)
> * If you don't have asserts enabled, you should find that no errors are logged but LOCAL_QUORUM reads cause TimedOutExceptions on the client.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (CASSANDRA-1924) Broken keyspace strategy_option
with zero replicas
Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-1924?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jonathan Ellis updated CASSANDRA-1924:
--------------------------------------
Affects Version/s: (was: 0.7.0 rc 3)
(was: 0.7.0 rc 2)
(was: 0.7.0 rc 1)
(was: 0.7 beta 2)
(was: 0.7 beta 3)
(was: 0.7 beta 1)
0.7.0
Fix Version/s: 0.7.4
Assignee: Sylvain Lebresne
> Broken keyspace strategy_option with zero replicas
> --------------------------------------------------
>
> Key: CASSANDRA-1924
> URL: https://issues.apache.org/jira/browse/CASSANDRA-1924
> Project: Cassandra
> Issue Type: Bug
> Components: Core
> Affects Versions: 0.7.0
> Reporter: Thor Carpenter
> Assignee: Sylvain Lebresne
> Priority: Minor
> Fix For: 0.7.4
>
>
> When a keyspace is defined that has strategy options specifying zero replicas should be place in a datacenter (e.g. DCX:0), an assert is violated for any insert and LOCAL_QUORUM reads fail. I'm not sure if the issue is that there are no nodes in DCX or that I'm saying DCX shouldn't get any replicas, or a combination of the two.
> The broken keyspace:
> create keyspace KeyspaceDC1 with
> replication_factor = 1 and
> placement_strategy = 'org.apache.cassandra.locator.NetworkTopologyStrategy' and
> strategy_options = [{DC1:1, DC2:0}];
> The fixed keyspace:
> create keyspace KeyspaceDC1 with
> replication_factor = 1 and
> placement_strategy = 'org.apache.cassandra.locator.NetworkTopologyStrategy' and
> strategy_options = [{DC1:1}];
> To reproduce:
> * Install the 0.7rc3 rpm on a single node in "DC1".
> * In cassandra.yaml set initial_token = 1 and specify PropertyFileSnitch.
> * cassandra-topology.properties:
> 10.5.64.26=DC1:R1
> default=DC2:R1
> * Schema loaded via cassandra-cli:
> create keyspace KeyspaceDC1 with
> replication_factor = 1 and
> placement_strategy = 'org.apache.cassandra.locator.NetworkTopologyStrategy' and
> strategy_options = [{DC1:1, DC2:0}];
> use KeyspaceDC1;
> create column family TestCF with
> column_type = 'Standard' and
> comparator = 'BytesType' and
> keys_cached = 200000 and
> rows_cached = 2000 and
> gc_grace = 0 and
> read_repair_chance = 0.0;
> * In cassandra-cli execute the following:
> [default@unknown] use KeyspaceDC1;
> Authenticated to keyspace: KeyspaceDC1
> [default@KeyspaceDC1] set TestCF['some key']['some col'] = 'some value';
> Internal error processing insert
> * If you have asserts enabled, check system.log where you should find the assertion error:
> DEBUG [pool-1-thread-3] 2010-12-29 12:10:38,897 CassandraServer.java (line 362) insert
> ERROR [pool-1-thread-3] 2010-12-29 12:10:38,906 Cassandra.java (line 2960) Internal error processing insert
> java.lang.AssertionError
> at org.apache.cassandra.locator.TokenMetadata.firstTokenIndex(TokenMetadata.java:392)
> at org.apache.cassandra.locator.TokenMetadata.ringIterator(TokenMetadata.java:417)
> at org.apache.cassandra.locator.NetworkTopologyStrategy.calculateNaturalEndpoints(NetworkTopologyStrategy.java:95)
> at org.apache.cassandra.locator.AbstractReplicationStrategy.getNaturalEndpoints(AbstractReplicationStrategy.java:99)
> at org.apache.cassandra.service.StorageService.getNaturalEndpoints(StorageService.java:1411)
> at org.apache.cassandra.service.StorageService.getNaturalEndpoints(StorageService.java:1394)
> at org.apache.cassandra.service.StorageProxy.mutate(StorageProxy.java:109)
> at org.apache.cassandra.thrift.CassandraServer.doInsert(CassandraServer.java:442)
> at org.apache.cassandra.thrift.CassandraServer.insert(CassandraServer.java:379)
> at org.apache.cassandra.thrift.Cassandra$Processor$insert.process(Cassandra.java:2952)
> at org.apache.cassandra.thrift.Cassandra$Processor.process(Cassandra.java:2555)
> at org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:167)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> at java.lang.Thread.run(Thread.java:619)
> * If you don't have asserts enabled, you should find that no errors are logged but LOCAL_QUORUM reads cause TimedOutExceptions on the client.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (CASSANDRA-1924) Broken keyspace strategy_option
with zero replicas
Posted by "Sylvain Lebresne (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-1924?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sylvain Lebresne updated CASSANDRA-1924:
----------------------------------------
Attachment: 0001-Ring-iterator-empty-list-test.patch
You are right, it's a bit cleaner. Attaching new version of first patch using Iterators functions.
> Broken keyspace strategy_option with zero replicas
> --------------------------------------------------
>
> Key: CASSANDRA-1924
> URL: https://issues.apache.org/jira/browse/CASSANDRA-1924
> Project: Cassandra
> Issue Type: Bug
> Components: Core
> Affects Versions: 0.7.0
> Reporter: Thor Carpenter
> Assignee: Sylvain Lebresne
> Priority: Minor
> Fix For: 0.7.4
>
> Attachments: 0001-Ring-iterator-empty-list-test.patch, 0002-NetworkTopologyStrategy-test-and-small-optim.patch
>
>
> When a keyspace is defined that has strategy options specifying zero replicas should be place in a datacenter (e.g. DCX:0), an assert is violated for any insert and LOCAL_QUORUM reads fail. I'm not sure if the issue is that there are no nodes in DCX or that I'm saying DCX shouldn't get any replicas, or a combination of the two.
> The broken keyspace:
> create keyspace KeyspaceDC1 with
> replication_factor = 1 and
> placement_strategy = 'org.apache.cassandra.locator.NetworkTopologyStrategy' and
> strategy_options = [{DC1:1, DC2:0}];
> The fixed keyspace:
> create keyspace KeyspaceDC1 with
> replication_factor = 1 and
> placement_strategy = 'org.apache.cassandra.locator.NetworkTopologyStrategy' and
> strategy_options = [{DC1:1}];
> To reproduce:
> * Install the 0.7rc3 rpm on a single node in "DC1".
> * In cassandra.yaml set initial_token = 1 and specify PropertyFileSnitch.
> * cassandra-topology.properties:
> 10.5.64.26=DC1:R1
> default=DC2:R1
> * Schema loaded via cassandra-cli:
> create keyspace KeyspaceDC1 with
> replication_factor = 1 and
> placement_strategy = 'org.apache.cassandra.locator.NetworkTopologyStrategy' and
> strategy_options = [{DC1:1, DC2:0}];
> use KeyspaceDC1;
> create column family TestCF with
> column_type = 'Standard' and
> comparator = 'BytesType' and
> keys_cached = 200000 and
> rows_cached = 2000 and
> gc_grace = 0 and
> read_repair_chance = 0.0;
> * In cassandra-cli execute the following:
> [default@unknown] use KeyspaceDC1;
> Authenticated to keyspace: KeyspaceDC1
> [default@KeyspaceDC1] set TestCF['some key']['some col'] = 'some value';
> Internal error processing insert
> * If you have asserts enabled, check system.log where you should find the assertion error:
> DEBUG [pool-1-thread-3] 2010-12-29 12:10:38,897 CassandraServer.java (line 362) insert
> ERROR [pool-1-thread-3] 2010-12-29 12:10:38,906 Cassandra.java (line 2960) Internal error processing insert
> java.lang.AssertionError
> at org.apache.cassandra.locator.TokenMetadata.firstTokenIndex(TokenMetadata.java:392)
> at org.apache.cassandra.locator.TokenMetadata.ringIterator(TokenMetadata.java:417)
> at org.apache.cassandra.locator.NetworkTopologyStrategy.calculateNaturalEndpoints(NetworkTopologyStrategy.java:95)
> at org.apache.cassandra.locator.AbstractReplicationStrategy.getNaturalEndpoints(AbstractReplicationStrategy.java:99)
> at org.apache.cassandra.service.StorageService.getNaturalEndpoints(StorageService.java:1411)
> at org.apache.cassandra.service.StorageService.getNaturalEndpoints(StorageService.java:1394)
> at org.apache.cassandra.service.StorageProxy.mutate(StorageProxy.java:109)
> at org.apache.cassandra.thrift.CassandraServer.doInsert(CassandraServer.java:442)
> at org.apache.cassandra.thrift.CassandraServer.insert(CassandraServer.java:379)
> at org.apache.cassandra.thrift.Cassandra$Processor$insert.process(Cassandra.java:2952)
> at org.apache.cassandra.thrift.Cassandra$Processor.process(Cassandra.java:2555)
> at org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:167)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> at java.lang.Thread.run(Thread.java:619)
> * If you don't have asserts enabled, you should find that no errors are logged but LOCAL_QUORUM reads cause TimedOutExceptions on the client.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (CASSANDRA-1924) Broken keyspace strategy_option
with zero replicas
Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-1924?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13005648#comment-13005648 ]
Jonathan Ellis commented on CASSANDRA-1924:
-------------------------------------------
would it be simpler to say something like "if ring.isEmpty() return Iterators.emptyIterator()"?
> Broken keyspace strategy_option with zero replicas
> --------------------------------------------------
>
> Key: CASSANDRA-1924
> URL: https://issues.apache.org/jira/browse/CASSANDRA-1924
> Project: Cassandra
> Issue Type: Bug
> Components: Core
> Affects Versions: 0.7.0
> Reporter: Thor Carpenter
> Assignee: Sylvain Lebresne
> Priority: Minor
> Fix For: 0.7.4
>
> Attachments: 0001-Ring-iterator-empty-list-test.patch, 0002-NetworkTopologyStrategy-test-and-small-optim.patch
>
>
> When a keyspace is defined that has strategy options specifying zero replicas should be place in a datacenter (e.g. DCX:0), an assert is violated for any insert and LOCAL_QUORUM reads fail. I'm not sure if the issue is that there are no nodes in DCX or that I'm saying DCX shouldn't get any replicas, or a combination of the two.
> The broken keyspace:
> create keyspace KeyspaceDC1 with
> replication_factor = 1 and
> placement_strategy = 'org.apache.cassandra.locator.NetworkTopologyStrategy' and
> strategy_options = [{DC1:1, DC2:0}];
> The fixed keyspace:
> create keyspace KeyspaceDC1 with
> replication_factor = 1 and
> placement_strategy = 'org.apache.cassandra.locator.NetworkTopologyStrategy' and
> strategy_options = [{DC1:1}];
> To reproduce:
> * Install the 0.7rc3 rpm on a single node in "DC1".
> * In cassandra.yaml set initial_token = 1 and specify PropertyFileSnitch.
> * cassandra-topology.properties:
> 10.5.64.26=DC1:R1
> default=DC2:R1
> * Schema loaded via cassandra-cli:
> create keyspace KeyspaceDC1 with
> replication_factor = 1 and
> placement_strategy = 'org.apache.cassandra.locator.NetworkTopologyStrategy' and
> strategy_options = [{DC1:1, DC2:0}];
> use KeyspaceDC1;
> create column family TestCF with
> column_type = 'Standard' and
> comparator = 'BytesType' and
> keys_cached = 200000 and
> rows_cached = 2000 and
> gc_grace = 0 and
> read_repair_chance = 0.0;
> * In cassandra-cli execute the following:
> [default@unknown] use KeyspaceDC1;
> Authenticated to keyspace: KeyspaceDC1
> [default@KeyspaceDC1] set TestCF['some key']['some col'] = 'some value';
> Internal error processing insert
> * If you have asserts enabled, check system.log where you should find the assertion error:
> DEBUG [pool-1-thread-3] 2010-12-29 12:10:38,897 CassandraServer.java (line 362) insert
> ERROR [pool-1-thread-3] 2010-12-29 12:10:38,906 Cassandra.java (line 2960) Internal error processing insert
> java.lang.AssertionError
> at org.apache.cassandra.locator.TokenMetadata.firstTokenIndex(TokenMetadata.java:392)
> at org.apache.cassandra.locator.TokenMetadata.ringIterator(TokenMetadata.java:417)
> at org.apache.cassandra.locator.NetworkTopologyStrategy.calculateNaturalEndpoints(NetworkTopologyStrategy.java:95)
> at org.apache.cassandra.locator.AbstractReplicationStrategy.getNaturalEndpoints(AbstractReplicationStrategy.java:99)
> at org.apache.cassandra.service.StorageService.getNaturalEndpoints(StorageService.java:1411)
> at org.apache.cassandra.service.StorageService.getNaturalEndpoints(StorageService.java:1394)
> at org.apache.cassandra.service.StorageProxy.mutate(StorageProxy.java:109)
> at org.apache.cassandra.thrift.CassandraServer.doInsert(CassandraServer.java:442)
> at org.apache.cassandra.thrift.CassandraServer.insert(CassandraServer.java:379)
> at org.apache.cassandra.thrift.Cassandra$Processor$insert.process(Cassandra.java:2952)
> at org.apache.cassandra.thrift.Cassandra$Processor.process(Cassandra.java:2555)
> at org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:167)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> at java.lang.Thread.run(Thread.java:619)
> * If you don't have asserts enabled, you should find that no errors are logged but LOCAL_QUORUM reads cause TimedOutExceptions on the client.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (CASSANDRA-1924) Broken keyspace strategy_option
with zero replicas
Posted by "Sylvain Lebresne (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-1924?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sylvain Lebresne updated CASSANDRA-1924:
----------------------------------------
Attachment: (was: 0001-Ring-iterator-empty-list-test.patch)
> Broken keyspace strategy_option with zero replicas
> --------------------------------------------------
>
> Key: CASSANDRA-1924
> URL: https://issues.apache.org/jira/browse/CASSANDRA-1924
> Project: Cassandra
> Issue Type: Bug
> Components: Core
> Affects Versions: 0.7.0
> Reporter: Thor Carpenter
> Assignee: Sylvain Lebresne
> Priority: Minor
> Fix For: 0.7.4
>
> Attachments: 0002-NetworkTopologyStrategy-test-and-small-optim.patch
>
>
> When a keyspace is defined that has strategy options specifying zero replicas should be place in a datacenter (e.g. DCX:0), an assert is violated for any insert and LOCAL_QUORUM reads fail. I'm not sure if the issue is that there are no nodes in DCX or that I'm saying DCX shouldn't get any replicas, or a combination of the two.
> The broken keyspace:
> create keyspace KeyspaceDC1 with
> replication_factor = 1 and
> placement_strategy = 'org.apache.cassandra.locator.NetworkTopologyStrategy' and
> strategy_options = [{DC1:1, DC2:0}];
> The fixed keyspace:
> create keyspace KeyspaceDC1 with
> replication_factor = 1 and
> placement_strategy = 'org.apache.cassandra.locator.NetworkTopologyStrategy' and
> strategy_options = [{DC1:1}];
> To reproduce:
> * Install the 0.7rc3 rpm on a single node in "DC1".
> * In cassandra.yaml set initial_token = 1 and specify PropertyFileSnitch.
> * cassandra-topology.properties:
> 10.5.64.26=DC1:R1
> default=DC2:R1
> * Schema loaded via cassandra-cli:
> create keyspace KeyspaceDC1 with
> replication_factor = 1 and
> placement_strategy = 'org.apache.cassandra.locator.NetworkTopologyStrategy' and
> strategy_options = [{DC1:1, DC2:0}];
> use KeyspaceDC1;
> create column family TestCF with
> column_type = 'Standard' and
> comparator = 'BytesType' and
> keys_cached = 200000 and
> rows_cached = 2000 and
> gc_grace = 0 and
> read_repair_chance = 0.0;
> * In cassandra-cli execute the following:
> [default@unknown] use KeyspaceDC1;
> Authenticated to keyspace: KeyspaceDC1
> [default@KeyspaceDC1] set TestCF['some key']['some col'] = 'some value';
> Internal error processing insert
> * If you have asserts enabled, check system.log where you should find the assertion error:
> DEBUG [pool-1-thread-3] 2010-12-29 12:10:38,897 CassandraServer.java (line 362) insert
> ERROR [pool-1-thread-3] 2010-12-29 12:10:38,906 Cassandra.java (line 2960) Internal error processing insert
> java.lang.AssertionError
> at org.apache.cassandra.locator.TokenMetadata.firstTokenIndex(TokenMetadata.java:392)
> at org.apache.cassandra.locator.TokenMetadata.ringIterator(TokenMetadata.java:417)
> at org.apache.cassandra.locator.NetworkTopologyStrategy.calculateNaturalEndpoints(NetworkTopologyStrategy.java:95)
> at org.apache.cassandra.locator.AbstractReplicationStrategy.getNaturalEndpoints(AbstractReplicationStrategy.java:99)
> at org.apache.cassandra.service.StorageService.getNaturalEndpoints(StorageService.java:1411)
> at org.apache.cassandra.service.StorageService.getNaturalEndpoints(StorageService.java:1394)
> at org.apache.cassandra.service.StorageProxy.mutate(StorageProxy.java:109)
> at org.apache.cassandra.thrift.CassandraServer.doInsert(CassandraServer.java:442)
> at org.apache.cassandra.thrift.CassandraServer.insert(CassandraServer.java:379)
> at org.apache.cassandra.thrift.Cassandra$Processor$insert.process(Cassandra.java:2952)
> at org.apache.cassandra.thrift.Cassandra$Processor.process(Cassandra.java:2555)
> at org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:167)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> at java.lang.Thread.run(Thread.java:619)
> * If you don't have asserts enabled, you should find that no errors are logged but LOCAL_QUORUM reads cause TimedOutExceptions on the client.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira