You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Jackson Chung (Created) (JIRA)" <ji...@apache.org> on 2011/09/29 01:27:45 UTC

[jira] [Created] (CASSANDRA-3272) READ Operation with CL=EACH_QUORUM succeed when a DC is down (RF=3)

READ Operation with CL=EACH_QUORUM succeed when a DC is down (RF=3)
-------------------------------------------------------------------

                 Key: CASSANDRA-3272
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3272
             Project: Cassandra
          Issue Type: Bug
            Reporter: Jackson Chung


"READ EACH_QUORUM: 	Returns the record with the most recent timestamp once a quorum of replicas in each data center of the cluster has responded."

In other words, if a DC is down and the QUORUM could not be reached on that DC, read should fail.

test case:
- Cassandra version 0.8.6:
INFO [main] 2011-09-28 22:26:24,297 StorageService.java (line 371) Cassandra version: 0.8.6

- 6-node cluster with 2 DC and 3 node each. RF=3 in each DC:
[default@Keyspace3] describe keyspace;
Keyspace: Keyspace3:
Replication Strategy: org.apache.cassandra.locator.NetworkTopologyStrategy
Durable Writes: true
Options: [DC2:3, DC1:3]
Column Families:
ColumnFamily: test
Key Validation Class: org.apache.cassandra.db.marshal.BytesType
Default column value validator: org.apache.cassandra.db.marshal.BytesType
Columns sorted by: org.apache.cassandra.db.marshal.BytesType
Row cache size / save period in seconds: 0.0/0
Key cache size / save period in seconds: 200000.0/14400
Memtable thresholds: 1.0875/1440/232 (millions of ops/minutes/MB)
GC grace seconds: 864000
Compaction min/max thresholds: 4/32
Read repair chance: 1.0
Replicate on write: true
Built indexes: []

all nodes are up, insert a row:

$ nodetool -h localhost ring
Address DC Rack Status State Load Owns Token
141784319550391026443072753096570088106
10.34.79.179 DC1 RAC1 Up Normal 11.13 KB 16.67% 0
10.34.70.163 DC2 RAC1 Up Normal 11.14 KB 16.67% 28356863910078205288614550619314017621
10.35.81.147 DC1 RAC1 Up Normal 11.14 KB 16.67% 56713727820156410577229101238628035242
10.84.233.170 DC2 RAC1 Up Normal 11.14 KB 16.67% 85070591730234615865843651857942052864
10.195.201.236 DC1 RAC1 Up Normal 11.14 KB 16.67% 113427455640312821154458202477256070485
10.118.147.73 DC2 RAC1 Up Normal 11.14 KB 16.67% 141784319550391026443072753096570088106

- insert a value 

[default@Keyspace3] set test[utf8('test-key-1')][utf8('test-col')]=utf8('test-value');
Value inserted.

sanity check (cli connects to a node in DC1) :
[default@Keyspace3] consistencylevel as EACH_QUORUM;                                  
Consistency level is set to 'EACH_QUORUM'.
[default@Keyspace3] get test[utf8('test-key-1')];   
=> (column=746573742d636f6c, value=test-value, timestamp=1317249361722000)
Returned 1 results

shut down DC2:
$ nodetool -h localhost ring
Address         DC          Rack        Status State   Load            Owns    Token                                       
                                                                               141784319550391026443072753096570088106     
10.34.79.179    DC1         RAC1        Up     Normal  51.86 KB        16.67%  0                                           
10.34.70.163    DC2         RAC1        Down   Normal  51.88 KB        16.67%  28356863910078205288614550619314017621      
10.35.81.147    DC1         RAC1        Up     Normal  47.5 KB         16.67%  56713727820156410577229101238628035242      
10.84.233.170   DC2         RAC1        Down   Normal  51.88 KB        16.67%  85070591730234615865843651857942052864      
10.195.201.236  DC1         RAC1        Up     Normal  47.5 KB         16.67%  113427455640312821154458202477256070485     
10.118.147.73   DC2         RAC1        Down   Normal  51.88 KB        16.67%  141784319550391026443072753096570088106  

[default@Keyspace3] get test[utf8('test-key-1')];   
=> (column=746573742d636f6c, value=746573742d76616c7565, timestamp=1317249361722000)
Returned 1 results.

tried with pycassaShell:
>>> col_fam.get('test-key-1',read_consistency_level=pycassa.ConsistencyLevel.EACH_QUORUM)
OrderedDict([('test-col', 'test-value')])


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CASSANDRA-3272) READ Operation with CL=EACH_QUORUM succeed when a DC is down (RF=3)

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

Sylvain Lebresne commented on CASSANDRA-3272:
---------------------------------------------

Shouldn't we move the validation up. We already have a validateConsistencyLevel in ThriftValidation for instance, we could just add a flag to if it's a write or read operation and throw the right exception there. If only for consistency, but I think it's nice to keep validating the queries upfront so we don't have to later anyway.

Which btw make me see that this validateConsistencyLevel is not called by CQL (which thus don't do the right check this function already does I suppose, or duplicate it). It would be worth checking if that's the only place where CQL is more loose than thrift in validating the query (and maybe we could refactor a bit the validation code so it's easier to apply it to both thrift and CQL).
                
> READ Operation with CL=EACH_QUORUM succeed when a DC is down (RF=3)
> -------------------------------------------------------------------
>
>                 Key: CASSANDRA-3272
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3272
>             Project: Cassandra
>          Issue Type: Bug
>    Affects Versions: 0.7.0
>            Reporter: Jackson Chung
>            Assignee: Jonathan Ellis
>            Priority: Minor
>             Fix For: 1.1
>
>         Attachments: 3272.txt
>
>
> "READ EACH_QUORUM: 	Returns the record with the most recent timestamp once a quorum of replicas in each data center of the cluster has responded."
> In other words, if a DC is down and the QUORUM could not be reached on that DC, read should fail.
> test case:
> - Cassandra version 0.8.6:
> INFO [main] 2011-09-28 22:26:24,297 StorageService.java (line 371) Cassandra version: 0.8.6
> - 6-node cluster with 2 DC and 3 node each. RF=3 in each DC:
> [default@Keyspace3] describe keyspace;
> Keyspace: Keyspace3:
> Replication Strategy: org.apache.cassandra.locator.NetworkTopologyStrategy
> Durable Writes: true
> Options: [DC2:3, DC1:3]
> Column Families:
> ColumnFamily: test
> Key Validation Class: org.apache.cassandra.db.marshal.BytesType
> Default column value validator: org.apache.cassandra.db.marshal.BytesType
> Columns sorted by: org.apache.cassandra.db.marshal.BytesType
> Row cache size / save period in seconds: 0.0/0
> Key cache size / save period in seconds: 200000.0/14400
> Memtable thresholds: 1.0875/1440/232 (millions of ops/minutes/MB)
> GC grace seconds: 864000
> Compaction min/max thresholds: 4/32
> Read repair chance: 1.0
> Replicate on write: true
> Built indexes: []
> all nodes are up, insert a row:
> $ nodetool -h localhost ring
> Address DC Rack Status State Load Owns Token
> 141784319550391026443072753096570088106
> 10.34.79.179 DC1 RAC1 Up Normal 11.13 KB 16.67% 0
> 10.34.70.163 DC2 RAC1 Up Normal 11.14 KB 16.67% 28356863910078205288614550619314017621
> 10.35.81.147 DC1 RAC1 Up Normal 11.14 KB 16.67% 56713727820156410577229101238628035242
> 10.84.233.170 DC2 RAC1 Up Normal 11.14 KB 16.67% 85070591730234615865843651857942052864
> 10.195.201.236 DC1 RAC1 Up Normal 11.14 KB 16.67% 113427455640312821154458202477256070485
> 10.118.147.73 DC2 RAC1 Up Normal 11.14 KB 16.67% 141784319550391026443072753096570088106
> - insert a value 
> [default@Keyspace3] set test[utf8('test-key-1')][utf8('test-col')]=utf8('test-value');
> Value inserted.
> sanity check (cli connects to a node in DC1) :
> [default@Keyspace3] consistencylevel as EACH_QUORUM;                                  
> Consistency level is set to 'EACH_QUORUM'.
> [default@Keyspace3] get test[utf8('test-key-1')];   
> => (column=746573742d636f6c, value=test-value, timestamp=1317249361722000)
> Returned 1 results
> shut down DC2:
> $ nodetool -h localhost ring
> Address         DC          Rack        Status State   Load            Owns    Token                                       
>                                                                                141784319550391026443072753096570088106     
> 10.34.79.179    DC1         RAC1        Up     Normal  51.86 KB        16.67%  0                                           
> 10.34.70.163    DC2         RAC1        Down   Normal  51.88 KB        16.67%  28356863910078205288614550619314017621      
> 10.35.81.147    DC1         RAC1        Up     Normal  47.5 KB         16.67%  56713727820156410577229101238628035242      
> 10.84.233.170   DC2         RAC1        Down   Normal  51.88 KB        16.67%  85070591730234615865843651857942052864      
> 10.195.201.236  DC1         RAC1        Up     Normal  47.5 KB         16.67%  113427455640312821154458202477256070485     
> 10.118.147.73   DC2         RAC1        Down   Normal  51.88 KB        16.67%  141784319550391026443072753096570088106  
> [default@Keyspace3] get test[utf8('test-key-1')];   
> => (column=746573742d636f6c, value=746573742d76616c7565, timestamp=1317249361722000)
> Returned 1 results.
> tried with pycassaShell:
> >>> col_fam.get('test-key-1',read_consistency_level=pycassa.ConsistencyLevel.EACH_QUORUM)
> OrderedDict([('test-col', 'test-value')])

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CASSANDRA-3272) READ Operation with CL=EACH_QUORUM succeed when a DC is down (RF=3)

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

Jonathan Ellis updated CASSANDRA-3272:
--------------------------------------

             Priority: Minor  (was: Major)
    Affects Version/s: 0.7.0
        Fix Version/s: 1.1
             Assignee: Jonathan Ellis
    
> READ Operation with CL=EACH_QUORUM succeed when a DC is down (RF=3)
> -------------------------------------------------------------------
>
>                 Key: CASSANDRA-3272
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3272
>             Project: Cassandra
>          Issue Type: Bug
>    Affects Versions: 0.7.0
>            Reporter: Jackson Chung
>            Assignee: Jonathan Ellis
>            Priority: Minor
>             Fix For: 1.1
>
>         Attachments: 3272.txt
>
>
> "READ EACH_QUORUM: 	Returns the record with the most recent timestamp once a quorum of replicas in each data center of the cluster has responded."
> In other words, if a DC is down and the QUORUM could not be reached on that DC, read should fail.
> test case:
> - Cassandra version 0.8.6:
> INFO [main] 2011-09-28 22:26:24,297 StorageService.java (line 371) Cassandra version: 0.8.6
> - 6-node cluster with 2 DC and 3 node each. RF=3 in each DC:
> [default@Keyspace3] describe keyspace;
> Keyspace: Keyspace3:
> Replication Strategy: org.apache.cassandra.locator.NetworkTopologyStrategy
> Durable Writes: true
> Options: [DC2:3, DC1:3]
> Column Families:
> ColumnFamily: test
> Key Validation Class: org.apache.cassandra.db.marshal.BytesType
> Default column value validator: org.apache.cassandra.db.marshal.BytesType
> Columns sorted by: org.apache.cassandra.db.marshal.BytesType
> Row cache size / save period in seconds: 0.0/0
> Key cache size / save period in seconds: 200000.0/14400
> Memtable thresholds: 1.0875/1440/232 (millions of ops/minutes/MB)
> GC grace seconds: 864000
> Compaction min/max thresholds: 4/32
> Read repair chance: 1.0
> Replicate on write: true
> Built indexes: []
> all nodes are up, insert a row:
> $ nodetool -h localhost ring
> Address DC Rack Status State Load Owns Token
> 141784319550391026443072753096570088106
> 10.34.79.179 DC1 RAC1 Up Normal 11.13 KB 16.67% 0
> 10.34.70.163 DC2 RAC1 Up Normal 11.14 KB 16.67% 28356863910078205288614550619314017621
> 10.35.81.147 DC1 RAC1 Up Normal 11.14 KB 16.67% 56713727820156410577229101238628035242
> 10.84.233.170 DC2 RAC1 Up Normal 11.14 KB 16.67% 85070591730234615865843651857942052864
> 10.195.201.236 DC1 RAC1 Up Normal 11.14 KB 16.67% 113427455640312821154458202477256070485
> 10.118.147.73 DC2 RAC1 Up Normal 11.14 KB 16.67% 141784319550391026443072753096570088106
> - insert a value 
> [default@Keyspace3] set test[utf8('test-key-1')][utf8('test-col')]=utf8('test-value');
> Value inserted.
> sanity check (cli connects to a node in DC1) :
> [default@Keyspace3] consistencylevel as EACH_QUORUM;                                  
> Consistency level is set to 'EACH_QUORUM'.
> [default@Keyspace3] get test[utf8('test-key-1')];   
> => (column=746573742d636f6c, value=test-value, timestamp=1317249361722000)
> Returned 1 results
> shut down DC2:
> $ nodetool -h localhost ring
> Address         DC          Rack        Status State   Load            Owns    Token                                       
>                                                                                141784319550391026443072753096570088106     
> 10.34.79.179    DC1         RAC1        Up     Normal  51.86 KB        16.67%  0                                           
> 10.34.70.163    DC2         RAC1        Down   Normal  51.88 KB        16.67%  28356863910078205288614550619314017621      
> 10.35.81.147    DC1         RAC1        Up     Normal  47.5 KB         16.67%  56713727820156410577229101238628035242      
> 10.84.233.170   DC2         RAC1        Down   Normal  51.88 KB        16.67%  85070591730234615865843651857942052864      
> 10.195.201.236  DC1         RAC1        Up     Normal  47.5 KB         16.67%  113427455640312821154458202477256070485     
> 10.118.147.73   DC2         RAC1        Down   Normal  51.88 KB        16.67%  141784319550391026443072753096570088106  
> [default@Keyspace3] get test[utf8('test-key-1')];   
> => (column=746573742d636f6c, value=746573742d76616c7565, timestamp=1317249361722000)
> Returned 1 results.
> tried with pycassaShell:
> >>> col_fam.get('test-key-1',read_consistency_level=pycassa.ConsistencyLevel.EACH_QUORUM)
> OrderedDict([('test-col', 'test-value')])

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CASSANDRA-3272) READ Operation with CL=EACH_QUORUM succeed when a DC is down (RF=3)

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

Jonathan Ellis commented on CASSANDRA-3272:
-------------------------------------------

Why are you using EACH_QUORUM?
                
> READ Operation with CL=EACH_QUORUM succeed when a DC is down (RF=3)
> -------------------------------------------------------------------
>
>                 Key: CASSANDRA-3272
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3272
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Jackson Chung
>
> "READ EACH_QUORUM: 	Returns the record with the most recent timestamp once a quorum of replicas in each data center of the cluster has responded."
> In other words, if a DC is down and the QUORUM could not be reached on that DC, read should fail.
> test case:
> - Cassandra version 0.8.6:
> INFO [main] 2011-09-28 22:26:24,297 StorageService.java (line 371) Cassandra version: 0.8.6
> - 6-node cluster with 2 DC and 3 node each. RF=3 in each DC:
> [default@Keyspace3] describe keyspace;
> Keyspace: Keyspace3:
> Replication Strategy: org.apache.cassandra.locator.NetworkTopologyStrategy
> Durable Writes: true
> Options: [DC2:3, DC1:3]
> Column Families:
> ColumnFamily: test
> Key Validation Class: org.apache.cassandra.db.marshal.BytesType
> Default column value validator: org.apache.cassandra.db.marshal.BytesType
> Columns sorted by: org.apache.cassandra.db.marshal.BytesType
> Row cache size / save period in seconds: 0.0/0
> Key cache size / save period in seconds: 200000.0/14400
> Memtable thresholds: 1.0875/1440/232 (millions of ops/minutes/MB)
> GC grace seconds: 864000
> Compaction min/max thresholds: 4/32
> Read repair chance: 1.0
> Replicate on write: true
> Built indexes: []
> all nodes are up, insert a row:
> $ nodetool -h localhost ring
> Address DC Rack Status State Load Owns Token
> 141784319550391026443072753096570088106
> 10.34.79.179 DC1 RAC1 Up Normal 11.13 KB 16.67% 0
> 10.34.70.163 DC2 RAC1 Up Normal 11.14 KB 16.67% 28356863910078205288614550619314017621
> 10.35.81.147 DC1 RAC1 Up Normal 11.14 KB 16.67% 56713727820156410577229101238628035242
> 10.84.233.170 DC2 RAC1 Up Normal 11.14 KB 16.67% 85070591730234615865843651857942052864
> 10.195.201.236 DC1 RAC1 Up Normal 11.14 KB 16.67% 113427455640312821154458202477256070485
> 10.118.147.73 DC2 RAC1 Up Normal 11.14 KB 16.67% 141784319550391026443072753096570088106
> - insert a value 
> [default@Keyspace3] set test[utf8('test-key-1')][utf8('test-col')]=utf8('test-value');
> Value inserted.
> sanity check (cli connects to a node in DC1) :
> [default@Keyspace3] consistencylevel as EACH_QUORUM;                                  
> Consistency level is set to 'EACH_QUORUM'.
> [default@Keyspace3] get test[utf8('test-key-1')];   
> => (column=746573742d636f6c, value=test-value, timestamp=1317249361722000)
> Returned 1 results
> shut down DC2:
> $ nodetool -h localhost ring
> Address         DC          Rack        Status State   Load            Owns    Token                                       
>                                                                                141784319550391026443072753096570088106     
> 10.34.79.179    DC1         RAC1        Up     Normal  51.86 KB        16.67%  0                                           
> 10.34.70.163    DC2         RAC1        Down   Normal  51.88 KB        16.67%  28356863910078205288614550619314017621      
> 10.35.81.147    DC1         RAC1        Up     Normal  47.5 KB         16.67%  56713727820156410577229101238628035242      
> 10.84.233.170   DC2         RAC1        Down   Normal  51.88 KB        16.67%  85070591730234615865843651857942052864      
> 10.195.201.236  DC1         RAC1        Up     Normal  47.5 KB         16.67%  113427455640312821154458202477256070485     
> 10.118.147.73   DC2         RAC1        Down   Normal  51.88 KB        16.67%  141784319550391026443072753096570088106  
> [default@Keyspace3] get test[utf8('test-key-1')];   
> => (column=746573742d636f6c, value=746573742d76616c7565, timestamp=1317249361722000)
> Returned 1 results.
> tried with pycassaShell:
> >>> col_fam.get('test-key-1',read_consistency_level=pycassa.ConsistencyLevel.EACH_QUORUM)
> OrderedDict([('test-col', 'test-value')])

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CASSANDRA-3272) READ Operation with CL=EACH_QUORUM succeed when a DC is down (RF=3)

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

Sylvain Lebresne commented on CASSANDRA-3272:
---------------------------------------------

+1 with the only nitpick that validateStrategyForCL could probably be more accurately (though less concisely) named validateStrategyForMultiDataCenterCL since it don't really use the consistency level excepted for the exception message.
                
> READ Operation with CL=EACH_QUORUM succeed when a DC is down (RF=3)
> -------------------------------------------------------------------
>
>                 Key: CASSANDRA-3272
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3272
>             Project: Cassandra
>          Issue Type: Bug
>    Affects Versions: 0.7.0
>            Reporter: Jackson Chung
>            Assignee: Jonathan Ellis
>            Priority: Minor
>             Fix For: 1.1
>
>         Attachments: 3272-v2.txt, 3272.txt
>
>
> "READ EACH_QUORUM: 	Returns the record with the most recent timestamp once a quorum of replicas in each data center of the cluster has responded."
> In other words, if a DC is down and the QUORUM could not be reached on that DC, read should fail.
> test case:
> - Cassandra version 0.8.6:
> INFO [main] 2011-09-28 22:26:24,297 StorageService.java (line 371) Cassandra version: 0.8.6
> - 6-node cluster with 2 DC and 3 node each. RF=3 in each DC:
> [default@Keyspace3] describe keyspace;
> Keyspace: Keyspace3:
> Replication Strategy: org.apache.cassandra.locator.NetworkTopologyStrategy
> Durable Writes: true
> Options: [DC2:3, DC1:3]
> Column Families:
> ColumnFamily: test
> Key Validation Class: org.apache.cassandra.db.marshal.BytesType
> Default column value validator: org.apache.cassandra.db.marshal.BytesType
> Columns sorted by: org.apache.cassandra.db.marshal.BytesType
> Row cache size / save period in seconds: 0.0/0
> Key cache size / save period in seconds: 200000.0/14400
> Memtable thresholds: 1.0875/1440/232 (millions of ops/minutes/MB)
> GC grace seconds: 864000
> Compaction min/max thresholds: 4/32
> Read repair chance: 1.0
> Replicate on write: true
> Built indexes: []
> all nodes are up, insert a row:
> $ nodetool -h localhost ring
> Address DC Rack Status State Load Owns Token
> 141784319550391026443072753096570088106
> 10.34.79.179 DC1 RAC1 Up Normal 11.13 KB 16.67% 0
> 10.34.70.163 DC2 RAC1 Up Normal 11.14 KB 16.67% 28356863910078205288614550619314017621
> 10.35.81.147 DC1 RAC1 Up Normal 11.14 KB 16.67% 56713727820156410577229101238628035242
> 10.84.233.170 DC2 RAC1 Up Normal 11.14 KB 16.67% 85070591730234615865843651857942052864
> 10.195.201.236 DC1 RAC1 Up Normal 11.14 KB 16.67% 113427455640312821154458202477256070485
> 10.118.147.73 DC2 RAC1 Up Normal 11.14 KB 16.67% 141784319550391026443072753096570088106
> - insert a value 
> [default@Keyspace3] set test[utf8('test-key-1')][utf8('test-col')]=utf8('test-value');
> Value inserted.
> sanity check (cli connects to a node in DC1) :
> [default@Keyspace3] consistencylevel as EACH_QUORUM;                                  
> Consistency level is set to 'EACH_QUORUM'.
> [default@Keyspace3] get test[utf8('test-key-1')];   
> => (column=746573742d636f6c, value=test-value, timestamp=1317249361722000)
> Returned 1 results
> shut down DC2:
> $ nodetool -h localhost ring
> Address         DC          Rack        Status State   Load            Owns    Token                                       
>                                                                                141784319550391026443072753096570088106     
> 10.34.79.179    DC1         RAC1        Up     Normal  51.86 KB        16.67%  0                                           
> 10.34.70.163    DC2         RAC1        Down   Normal  51.88 KB        16.67%  28356863910078205288614550619314017621      
> 10.35.81.147    DC1         RAC1        Up     Normal  47.5 KB         16.67%  56713727820156410577229101238628035242      
> 10.84.233.170   DC2         RAC1        Down   Normal  51.88 KB        16.67%  85070591730234615865843651857942052864      
> 10.195.201.236  DC1         RAC1        Up     Normal  47.5 KB         16.67%  113427455640312821154458202477256070485     
> 10.118.147.73   DC2         RAC1        Down   Normal  51.88 KB        16.67%  141784319550391026443072753096570088106  
> [default@Keyspace3] get test[utf8('test-key-1')];   
> => (column=746573742d636f6c, value=746573742d76616c7565, timestamp=1317249361722000)
> Returned 1 results.
> tried with pycassaShell:
> >>> col_fam.get('test-key-1',read_consistency_level=pycassa.ConsistencyLevel.EACH_QUORUM)
> OrderedDict([('test-col', 'test-value')])

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CASSANDRA-3272) READ Operation with CL=EACH_QUORUM succeed when a DC is down (RF=3)

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

Jackson Chung commented on CASSANDRA-3272:
------------------------------------------

"Why are you using EACH_QUORUM?"
 -- no particular reason other than testing.

"I can't think of any reason someone would actually want to do EACH_QUORUM on a read, when LOCAL_QUORUM would be sufficient if the write was done at EACH_QUORUM. "
 -- would it make sense to make such consistency level as an "invalid to use" for READ then?

What if write (update, say add a new column/value to the key) is done via LOCAL_QUORUM to DC1 but DC2 were down. 
anti-entropy repair wasn't done
stop DC1 (for some reason this step is important)
now bring DC2 back up (assume HH is off)
read LQ from DC2.. 
you get an outdated result. 

at least i think with EACH_QUORUM on a read, you should get an consistent result if 2 nodes replicas agreed on each DC (in the example where RF=3 in each DC)

(and you should get an UAE in the above example)
                
> READ Operation with CL=EACH_QUORUM succeed when a DC is down (RF=3)
> -------------------------------------------------------------------
>
>                 Key: CASSANDRA-3272
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3272
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Jackson Chung
>
> "READ EACH_QUORUM: 	Returns the record with the most recent timestamp once a quorum of replicas in each data center of the cluster has responded."
> In other words, if a DC is down and the QUORUM could not be reached on that DC, read should fail.
> test case:
> - Cassandra version 0.8.6:
> INFO [main] 2011-09-28 22:26:24,297 StorageService.java (line 371) Cassandra version: 0.8.6
> - 6-node cluster with 2 DC and 3 node each. RF=3 in each DC:
> [default@Keyspace3] describe keyspace;
> Keyspace: Keyspace3:
> Replication Strategy: org.apache.cassandra.locator.NetworkTopologyStrategy
> Durable Writes: true
> Options: [DC2:3, DC1:3]
> Column Families:
> ColumnFamily: test
> Key Validation Class: org.apache.cassandra.db.marshal.BytesType
> Default column value validator: org.apache.cassandra.db.marshal.BytesType
> Columns sorted by: org.apache.cassandra.db.marshal.BytesType
> Row cache size / save period in seconds: 0.0/0
> Key cache size / save period in seconds: 200000.0/14400
> Memtable thresholds: 1.0875/1440/232 (millions of ops/minutes/MB)
> GC grace seconds: 864000
> Compaction min/max thresholds: 4/32
> Read repair chance: 1.0
> Replicate on write: true
> Built indexes: []
> all nodes are up, insert a row:
> $ nodetool -h localhost ring
> Address DC Rack Status State Load Owns Token
> 141784319550391026443072753096570088106
> 10.34.79.179 DC1 RAC1 Up Normal 11.13 KB 16.67% 0
> 10.34.70.163 DC2 RAC1 Up Normal 11.14 KB 16.67% 28356863910078205288614550619314017621
> 10.35.81.147 DC1 RAC1 Up Normal 11.14 KB 16.67% 56713727820156410577229101238628035242
> 10.84.233.170 DC2 RAC1 Up Normal 11.14 KB 16.67% 85070591730234615865843651857942052864
> 10.195.201.236 DC1 RAC1 Up Normal 11.14 KB 16.67% 113427455640312821154458202477256070485
> 10.118.147.73 DC2 RAC1 Up Normal 11.14 KB 16.67% 141784319550391026443072753096570088106
> - insert a value 
> [default@Keyspace3] set test[utf8('test-key-1')][utf8('test-col')]=utf8('test-value');
> Value inserted.
> sanity check (cli connects to a node in DC1) :
> [default@Keyspace3] consistencylevel as EACH_QUORUM;                                  
> Consistency level is set to 'EACH_QUORUM'.
> [default@Keyspace3] get test[utf8('test-key-1')];   
> => (column=746573742d636f6c, value=test-value, timestamp=1317249361722000)
> Returned 1 results
> shut down DC2:
> $ nodetool -h localhost ring
> Address         DC          Rack        Status State   Load            Owns    Token                                       
>                                                                                141784319550391026443072753096570088106     
> 10.34.79.179    DC1         RAC1        Up     Normal  51.86 KB        16.67%  0                                           
> 10.34.70.163    DC2         RAC1        Down   Normal  51.88 KB        16.67%  28356863910078205288614550619314017621      
> 10.35.81.147    DC1         RAC1        Up     Normal  47.5 KB         16.67%  56713727820156410577229101238628035242      
> 10.84.233.170   DC2         RAC1        Down   Normal  51.88 KB        16.67%  85070591730234615865843651857942052864      
> 10.195.201.236  DC1         RAC1        Up     Normal  47.5 KB         16.67%  113427455640312821154458202477256070485     
> 10.118.147.73   DC2         RAC1        Down   Normal  51.88 KB        16.67%  141784319550391026443072753096570088106  
> [default@Keyspace3] get test[utf8('test-key-1')];   
> => (column=746573742d636f6c, value=746573742d76616c7565, timestamp=1317249361722000)
> Returned 1 results.
> tried with pycassaShell:
> >>> col_fam.get('test-key-1',read_consistency_level=pycassa.ConsistencyLevel.EACH_QUORUM)
> OrderedDict([('test-col', 'test-value')])

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CASSANDRA-3272) READ Operation with CL=EACH_QUORUM succeed when a DC is down (RF=3)

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

Hudson commented on CASSANDRA-3272:
-----------------------------------

Integrated in Cassandra #1160 (See [https://builds.apache.org/job/Cassandra/1160/])
    EACH_QUORUM is only supported for writes
patch by jbellis; reviewed by slebresne for CASSANDRA-3272

jbellis : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1185669
Files : 
* /cassandra/trunk/CHANGES.txt
* /cassandra/trunk/NEWS.txt
* /cassandra/trunk/src/java/org/apache/cassandra/cql/QueryProcessor.java
* /cassandra/trunk/src/java/org/apache/cassandra/thrift/CassandraServer.java
* /cassandra/trunk/src/java/org/apache/cassandra/thrift/RequestType.java
* /cassandra/trunk/src/java/org/apache/cassandra/thrift/ThriftValidation.java

                
> READ Operation with CL=EACH_QUORUM succeed when a DC is down (RF=3)
> -------------------------------------------------------------------
>
>                 Key: CASSANDRA-3272
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3272
>             Project: Cassandra
>          Issue Type: Bug
>    Affects Versions: 0.7.0
>            Reporter: Jackson Chung
>            Assignee: Jonathan Ellis
>            Priority: Minor
>             Fix For: 1.1
>
>         Attachments: 3272-v2.txt, 3272.txt
>
>
> "READ EACH_QUORUM: 	Returns the record with the most recent timestamp once a quorum of replicas in each data center of the cluster has responded."
> In other words, if a DC is down and the QUORUM could not be reached on that DC, read should fail.
> test case:
> - Cassandra version 0.8.6:
> INFO [main] 2011-09-28 22:26:24,297 StorageService.java (line 371) Cassandra version: 0.8.6
> - 6-node cluster with 2 DC and 3 node each. RF=3 in each DC:
> [default@Keyspace3] describe keyspace;
> Keyspace: Keyspace3:
> Replication Strategy: org.apache.cassandra.locator.NetworkTopologyStrategy
> Durable Writes: true
> Options: [DC2:3, DC1:3]
> Column Families:
> ColumnFamily: test
> Key Validation Class: org.apache.cassandra.db.marshal.BytesType
> Default column value validator: org.apache.cassandra.db.marshal.BytesType
> Columns sorted by: org.apache.cassandra.db.marshal.BytesType
> Row cache size / save period in seconds: 0.0/0
> Key cache size / save period in seconds: 200000.0/14400
> Memtable thresholds: 1.0875/1440/232 (millions of ops/minutes/MB)
> GC grace seconds: 864000
> Compaction min/max thresholds: 4/32
> Read repair chance: 1.0
> Replicate on write: true
> Built indexes: []
> all nodes are up, insert a row:
> $ nodetool -h localhost ring
> Address DC Rack Status State Load Owns Token
> 141784319550391026443072753096570088106
> 10.34.79.179 DC1 RAC1 Up Normal 11.13 KB 16.67% 0
> 10.34.70.163 DC2 RAC1 Up Normal 11.14 KB 16.67% 28356863910078205288614550619314017621
> 10.35.81.147 DC1 RAC1 Up Normal 11.14 KB 16.67% 56713727820156410577229101238628035242
> 10.84.233.170 DC2 RAC1 Up Normal 11.14 KB 16.67% 85070591730234615865843651857942052864
> 10.195.201.236 DC1 RAC1 Up Normal 11.14 KB 16.67% 113427455640312821154458202477256070485
> 10.118.147.73 DC2 RAC1 Up Normal 11.14 KB 16.67% 141784319550391026443072753096570088106
> - insert a value 
> [default@Keyspace3] set test[utf8('test-key-1')][utf8('test-col')]=utf8('test-value');
> Value inserted.
> sanity check (cli connects to a node in DC1) :
> [default@Keyspace3] consistencylevel as EACH_QUORUM;                                  
> Consistency level is set to 'EACH_QUORUM'.
> [default@Keyspace3] get test[utf8('test-key-1')];   
> => (column=746573742d636f6c, value=test-value, timestamp=1317249361722000)
> Returned 1 results
> shut down DC2:
> $ nodetool -h localhost ring
> Address         DC          Rack        Status State   Load            Owns    Token                                       
>                                                                                141784319550391026443072753096570088106     
> 10.34.79.179    DC1         RAC1        Up     Normal  51.86 KB        16.67%  0                                           
> 10.34.70.163    DC2         RAC1        Down   Normal  51.88 KB        16.67%  28356863910078205288614550619314017621      
> 10.35.81.147    DC1         RAC1        Up     Normal  47.5 KB         16.67%  56713727820156410577229101238628035242      
> 10.84.233.170   DC2         RAC1        Down   Normal  51.88 KB        16.67%  85070591730234615865843651857942052864      
> 10.195.201.236  DC1         RAC1        Up     Normal  47.5 KB         16.67%  113427455640312821154458202477256070485     
> 10.118.147.73   DC2         RAC1        Down   Normal  51.88 KB        16.67%  141784319550391026443072753096570088106  
> [default@Keyspace3] get test[utf8('test-key-1')];   
> => (column=746573742d636f6c, value=746573742d76616c7565, timestamp=1317249361722000)
> Returned 1 results.
> tried with pycassaShell:
> >>> col_fam.get('test-key-1',read_consistency_level=pycassa.ConsistencyLevel.EACH_QUORUM)
> OrderedDict([('test-col', 'test-value')])

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CASSANDRA-3272) READ Operation with CL=EACH_QUORUM succeed when a DC is down (RF=3)

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

Jonathan Ellis updated CASSANDRA-3272:
--------------------------------------

    Attachment: 3272-v2.txt

v2 attached
                
> READ Operation with CL=EACH_QUORUM succeed when a DC is down (RF=3)
> -------------------------------------------------------------------
>
>                 Key: CASSANDRA-3272
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3272
>             Project: Cassandra
>          Issue Type: Bug
>    Affects Versions: 0.7.0
>            Reporter: Jackson Chung
>            Assignee: Jonathan Ellis
>            Priority: Minor
>             Fix For: 1.1
>
>         Attachments: 3272-v2.txt, 3272.txt
>
>
> "READ EACH_QUORUM: 	Returns the record with the most recent timestamp once a quorum of replicas in each data center of the cluster has responded."
> In other words, if a DC is down and the QUORUM could not be reached on that DC, read should fail.
> test case:
> - Cassandra version 0.8.6:
> INFO [main] 2011-09-28 22:26:24,297 StorageService.java (line 371) Cassandra version: 0.8.6
> - 6-node cluster with 2 DC and 3 node each. RF=3 in each DC:
> [default@Keyspace3] describe keyspace;
> Keyspace: Keyspace3:
> Replication Strategy: org.apache.cassandra.locator.NetworkTopologyStrategy
> Durable Writes: true
> Options: [DC2:3, DC1:3]
> Column Families:
> ColumnFamily: test
> Key Validation Class: org.apache.cassandra.db.marshal.BytesType
> Default column value validator: org.apache.cassandra.db.marshal.BytesType
> Columns sorted by: org.apache.cassandra.db.marshal.BytesType
> Row cache size / save period in seconds: 0.0/0
> Key cache size / save period in seconds: 200000.0/14400
> Memtable thresholds: 1.0875/1440/232 (millions of ops/minutes/MB)
> GC grace seconds: 864000
> Compaction min/max thresholds: 4/32
> Read repair chance: 1.0
> Replicate on write: true
> Built indexes: []
> all nodes are up, insert a row:
> $ nodetool -h localhost ring
> Address DC Rack Status State Load Owns Token
> 141784319550391026443072753096570088106
> 10.34.79.179 DC1 RAC1 Up Normal 11.13 KB 16.67% 0
> 10.34.70.163 DC2 RAC1 Up Normal 11.14 KB 16.67% 28356863910078205288614550619314017621
> 10.35.81.147 DC1 RAC1 Up Normal 11.14 KB 16.67% 56713727820156410577229101238628035242
> 10.84.233.170 DC2 RAC1 Up Normal 11.14 KB 16.67% 85070591730234615865843651857942052864
> 10.195.201.236 DC1 RAC1 Up Normal 11.14 KB 16.67% 113427455640312821154458202477256070485
> 10.118.147.73 DC2 RAC1 Up Normal 11.14 KB 16.67% 141784319550391026443072753096570088106
> - insert a value 
> [default@Keyspace3] set test[utf8('test-key-1')][utf8('test-col')]=utf8('test-value');
> Value inserted.
> sanity check (cli connects to a node in DC1) :
> [default@Keyspace3] consistencylevel as EACH_QUORUM;                                  
> Consistency level is set to 'EACH_QUORUM'.
> [default@Keyspace3] get test[utf8('test-key-1')];   
> => (column=746573742d636f6c, value=test-value, timestamp=1317249361722000)
> Returned 1 results
> shut down DC2:
> $ nodetool -h localhost ring
> Address         DC          Rack        Status State   Load            Owns    Token                                       
>                                                                                141784319550391026443072753096570088106     
> 10.34.79.179    DC1         RAC1        Up     Normal  51.86 KB        16.67%  0                                           
> 10.34.70.163    DC2         RAC1        Down   Normal  51.88 KB        16.67%  28356863910078205288614550619314017621      
> 10.35.81.147    DC1         RAC1        Up     Normal  47.5 KB         16.67%  56713727820156410577229101238628035242      
> 10.84.233.170   DC2         RAC1        Down   Normal  51.88 KB        16.67%  85070591730234615865843651857942052864      
> 10.195.201.236  DC1         RAC1        Up     Normal  47.5 KB         16.67%  113427455640312821154458202477256070485     
> 10.118.147.73   DC2         RAC1        Down   Normal  51.88 KB        16.67%  141784319550391026443072753096570088106  
> [default@Keyspace3] get test[utf8('test-key-1')];   
> => (column=746573742d636f6c, value=746573742d76616c7565, timestamp=1317249361722000)
> Returned 1 results.
> tried with pycassaShell:
> >>> col_fam.get('test-key-1',read_consistency_level=pycassa.ConsistencyLevel.EACH_QUORUM)
> OrderedDict([('test-col', 'test-value')])

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CASSANDRA-3272) READ Operation with CL=EACH_QUORUM succeed when a DC is down (RF=3)

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

Brandon Williams commented on CASSANDRA-3272:
---------------------------------------------

bq. In other words, if a DC is down and the QUORUM could not be reached on that DC, read should fail.

I can't think of any reason someone would actually want to do EACH_QUORUM on a read, when LOCAL_QUORUM would be sufficient if the write was done at EACH_QUORUM.  
                
> READ Operation with CL=EACH_QUORUM succeed when a DC is down (RF=3)
> -------------------------------------------------------------------
>
>                 Key: CASSANDRA-3272
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3272
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Jackson Chung
>
> "READ EACH_QUORUM: 	Returns the record with the most recent timestamp once a quorum of replicas in each data center of the cluster has responded."
> In other words, if a DC is down and the QUORUM could not be reached on that DC, read should fail.
> test case:
> - Cassandra version 0.8.6:
> INFO [main] 2011-09-28 22:26:24,297 StorageService.java (line 371) Cassandra version: 0.8.6
> - 6-node cluster with 2 DC and 3 node each. RF=3 in each DC:
> [default@Keyspace3] describe keyspace;
> Keyspace: Keyspace3:
> Replication Strategy: org.apache.cassandra.locator.NetworkTopologyStrategy
> Durable Writes: true
> Options: [DC2:3, DC1:3]
> Column Families:
> ColumnFamily: test
> Key Validation Class: org.apache.cassandra.db.marshal.BytesType
> Default column value validator: org.apache.cassandra.db.marshal.BytesType
> Columns sorted by: org.apache.cassandra.db.marshal.BytesType
> Row cache size / save period in seconds: 0.0/0
> Key cache size / save period in seconds: 200000.0/14400
> Memtable thresholds: 1.0875/1440/232 (millions of ops/minutes/MB)
> GC grace seconds: 864000
> Compaction min/max thresholds: 4/32
> Read repair chance: 1.0
> Replicate on write: true
> Built indexes: []
> all nodes are up, insert a row:
> $ nodetool -h localhost ring
> Address DC Rack Status State Load Owns Token
> 141784319550391026443072753096570088106
> 10.34.79.179 DC1 RAC1 Up Normal 11.13 KB 16.67% 0
> 10.34.70.163 DC2 RAC1 Up Normal 11.14 KB 16.67% 28356863910078205288614550619314017621
> 10.35.81.147 DC1 RAC1 Up Normal 11.14 KB 16.67% 56713727820156410577229101238628035242
> 10.84.233.170 DC2 RAC1 Up Normal 11.14 KB 16.67% 85070591730234615865843651857942052864
> 10.195.201.236 DC1 RAC1 Up Normal 11.14 KB 16.67% 113427455640312821154458202477256070485
> 10.118.147.73 DC2 RAC1 Up Normal 11.14 KB 16.67% 141784319550391026443072753096570088106
> - insert a value 
> [default@Keyspace3] set test[utf8('test-key-1')][utf8('test-col')]=utf8('test-value');
> Value inserted.
> sanity check (cli connects to a node in DC1) :
> [default@Keyspace3] consistencylevel as EACH_QUORUM;                                  
> Consistency level is set to 'EACH_QUORUM'.
> [default@Keyspace3] get test[utf8('test-key-1')];   
> => (column=746573742d636f6c, value=test-value, timestamp=1317249361722000)
> Returned 1 results
> shut down DC2:
> $ nodetool -h localhost ring
> Address         DC          Rack        Status State   Load            Owns    Token                                       
>                                                                                141784319550391026443072753096570088106     
> 10.34.79.179    DC1         RAC1        Up     Normal  51.86 KB        16.67%  0                                           
> 10.34.70.163    DC2         RAC1        Down   Normal  51.88 KB        16.67%  28356863910078205288614550619314017621      
> 10.35.81.147    DC1         RAC1        Up     Normal  47.5 KB         16.67%  56713727820156410577229101238628035242      
> 10.84.233.170   DC2         RAC1        Down   Normal  51.88 KB        16.67%  85070591730234615865843651857942052864      
> 10.195.201.236  DC1         RAC1        Up     Normal  47.5 KB         16.67%  113427455640312821154458202477256070485     
> 10.118.147.73   DC2         RAC1        Down   Normal  51.88 KB        16.67%  141784319550391026443072753096570088106  
> [default@Keyspace3] get test[utf8('test-key-1')];   
> => (column=746573742d636f6c, value=746573742d76616c7565, timestamp=1317249361722000)
> Returned 1 results.
> tried with pycassaShell:
> >>> col_fam.get('test-key-1',read_consistency_level=pycassa.ConsistencyLevel.EACH_QUORUM)
> OrderedDict([('test-col', 'test-value')])

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CASSANDRA-3272) READ Operation with CL=EACH_QUORUM succeed when a DC is down (RF=3)

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

Jonathan Ellis commented on CASSANDRA-3272:
-------------------------------------------

(I ask because I've never seen it be the "right" CL yet.)
                
> READ Operation with CL=EACH_QUORUM succeed when a DC is down (RF=3)
> -------------------------------------------------------------------
>
>                 Key: CASSANDRA-3272
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3272
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Jackson Chung
>
> "READ EACH_QUORUM: 	Returns the record with the most recent timestamp once a quorum of replicas in each data center of the cluster has responded."
> In other words, if a DC is down and the QUORUM could not be reached on that DC, read should fail.
> test case:
> - Cassandra version 0.8.6:
> INFO [main] 2011-09-28 22:26:24,297 StorageService.java (line 371) Cassandra version: 0.8.6
> - 6-node cluster with 2 DC and 3 node each. RF=3 in each DC:
> [default@Keyspace3] describe keyspace;
> Keyspace: Keyspace3:
> Replication Strategy: org.apache.cassandra.locator.NetworkTopologyStrategy
> Durable Writes: true
> Options: [DC2:3, DC1:3]
> Column Families:
> ColumnFamily: test
> Key Validation Class: org.apache.cassandra.db.marshal.BytesType
> Default column value validator: org.apache.cassandra.db.marshal.BytesType
> Columns sorted by: org.apache.cassandra.db.marshal.BytesType
> Row cache size / save period in seconds: 0.0/0
> Key cache size / save period in seconds: 200000.0/14400
> Memtable thresholds: 1.0875/1440/232 (millions of ops/minutes/MB)
> GC grace seconds: 864000
> Compaction min/max thresholds: 4/32
> Read repair chance: 1.0
> Replicate on write: true
> Built indexes: []
> all nodes are up, insert a row:
> $ nodetool -h localhost ring
> Address DC Rack Status State Load Owns Token
> 141784319550391026443072753096570088106
> 10.34.79.179 DC1 RAC1 Up Normal 11.13 KB 16.67% 0
> 10.34.70.163 DC2 RAC1 Up Normal 11.14 KB 16.67% 28356863910078205288614550619314017621
> 10.35.81.147 DC1 RAC1 Up Normal 11.14 KB 16.67% 56713727820156410577229101238628035242
> 10.84.233.170 DC2 RAC1 Up Normal 11.14 KB 16.67% 85070591730234615865843651857942052864
> 10.195.201.236 DC1 RAC1 Up Normal 11.14 KB 16.67% 113427455640312821154458202477256070485
> 10.118.147.73 DC2 RAC1 Up Normal 11.14 KB 16.67% 141784319550391026443072753096570088106
> - insert a value 
> [default@Keyspace3] set test[utf8('test-key-1')][utf8('test-col')]=utf8('test-value');
> Value inserted.
> sanity check (cli connects to a node in DC1) :
> [default@Keyspace3] consistencylevel as EACH_QUORUM;                                  
> Consistency level is set to 'EACH_QUORUM'.
> [default@Keyspace3] get test[utf8('test-key-1')];   
> => (column=746573742d636f6c, value=test-value, timestamp=1317249361722000)
> Returned 1 results
> shut down DC2:
> $ nodetool -h localhost ring
> Address         DC          Rack        Status State   Load            Owns    Token                                       
>                                                                                141784319550391026443072753096570088106     
> 10.34.79.179    DC1         RAC1        Up     Normal  51.86 KB        16.67%  0                                           
> 10.34.70.163    DC2         RAC1        Down   Normal  51.88 KB        16.67%  28356863910078205288614550619314017621      
> 10.35.81.147    DC1         RAC1        Up     Normal  47.5 KB         16.67%  56713727820156410577229101238628035242      
> 10.84.233.170   DC2         RAC1        Down   Normal  51.88 KB        16.67%  85070591730234615865843651857942052864      
> 10.195.201.236  DC1         RAC1        Up     Normal  47.5 KB         16.67%  113427455640312821154458202477256070485     
> 10.118.147.73   DC2         RAC1        Down   Normal  51.88 KB        16.67%  141784319550391026443072753096570088106  
> [default@Keyspace3] get test[utf8('test-key-1')];   
> => (column=746573742d636f6c, value=746573742d76616c7565, timestamp=1317249361722000)
> Returned 1 results.
> tried with pycassaShell:
> >>> col_fam.get('test-key-1',read_consistency_level=pycassa.ConsistencyLevel.EACH_QUORUM)
> OrderedDict([('test-col', 'test-value')])

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CASSANDRA-3272) READ Operation with CL=EACH_QUORUM succeed when a DC is down (RF=3)

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

Jonathan Ellis updated CASSANDRA-3272:
--------------------------------------

    Attachment: 3272.txt

currently EACH_QUORUM silently does LOCAL_QUORUM instead. Patch attached to raise an error saying EACH_QUORUM is only supported for writes.
                
> READ Operation with CL=EACH_QUORUM succeed when a DC is down (RF=3)
> -------------------------------------------------------------------
>
>                 Key: CASSANDRA-3272
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3272
>             Project: Cassandra
>          Issue Type: Bug
>    Affects Versions: 0.7.0
>            Reporter: Jackson Chung
>            Assignee: Jonathan Ellis
>            Priority: Minor
>             Fix For: 1.1
>
>         Attachments: 3272.txt
>
>
> "READ EACH_QUORUM: 	Returns the record with the most recent timestamp once a quorum of replicas in each data center of the cluster has responded."
> In other words, if a DC is down and the QUORUM could not be reached on that DC, read should fail.
> test case:
> - Cassandra version 0.8.6:
> INFO [main] 2011-09-28 22:26:24,297 StorageService.java (line 371) Cassandra version: 0.8.6
> - 6-node cluster with 2 DC and 3 node each. RF=3 in each DC:
> [default@Keyspace3] describe keyspace;
> Keyspace: Keyspace3:
> Replication Strategy: org.apache.cassandra.locator.NetworkTopologyStrategy
> Durable Writes: true
> Options: [DC2:3, DC1:3]
> Column Families:
> ColumnFamily: test
> Key Validation Class: org.apache.cassandra.db.marshal.BytesType
> Default column value validator: org.apache.cassandra.db.marshal.BytesType
> Columns sorted by: org.apache.cassandra.db.marshal.BytesType
> Row cache size / save period in seconds: 0.0/0
> Key cache size / save period in seconds: 200000.0/14400
> Memtable thresholds: 1.0875/1440/232 (millions of ops/minutes/MB)
> GC grace seconds: 864000
> Compaction min/max thresholds: 4/32
> Read repair chance: 1.0
> Replicate on write: true
> Built indexes: []
> all nodes are up, insert a row:
> $ nodetool -h localhost ring
> Address DC Rack Status State Load Owns Token
> 141784319550391026443072753096570088106
> 10.34.79.179 DC1 RAC1 Up Normal 11.13 KB 16.67% 0
> 10.34.70.163 DC2 RAC1 Up Normal 11.14 KB 16.67% 28356863910078205288614550619314017621
> 10.35.81.147 DC1 RAC1 Up Normal 11.14 KB 16.67% 56713727820156410577229101238628035242
> 10.84.233.170 DC2 RAC1 Up Normal 11.14 KB 16.67% 85070591730234615865843651857942052864
> 10.195.201.236 DC1 RAC1 Up Normal 11.14 KB 16.67% 113427455640312821154458202477256070485
> 10.118.147.73 DC2 RAC1 Up Normal 11.14 KB 16.67% 141784319550391026443072753096570088106
> - insert a value 
> [default@Keyspace3] set test[utf8('test-key-1')][utf8('test-col')]=utf8('test-value');
> Value inserted.
> sanity check (cli connects to a node in DC1) :
> [default@Keyspace3] consistencylevel as EACH_QUORUM;                                  
> Consistency level is set to 'EACH_QUORUM'.
> [default@Keyspace3] get test[utf8('test-key-1')];   
> => (column=746573742d636f6c, value=test-value, timestamp=1317249361722000)
> Returned 1 results
> shut down DC2:
> $ nodetool -h localhost ring
> Address         DC          Rack        Status State   Load            Owns    Token                                       
>                                                                                141784319550391026443072753096570088106     
> 10.34.79.179    DC1         RAC1        Up     Normal  51.86 KB        16.67%  0                                           
> 10.34.70.163    DC2         RAC1        Down   Normal  51.88 KB        16.67%  28356863910078205288614550619314017621      
> 10.35.81.147    DC1         RAC1        Up     Normal  47.5 KB         16.67%  56713727820156410577229101238628035242      
> 10.84.233.170   DC2         RAC1        Down   Normal  51.88 KB        16.67%  85070591730234615865843651857942052864      
> 10.195.201.236  DC1         RAC1        Up     Normal  47.5 KB         16.67%  113427455640312821154458202477256070485     
> 10.118.147.73   DC2         RAC1        Down   Normal  51.88 KB        16.67%  141784319550391026443072753096570088106  
> [default@Keyspace3] get test[utf8('test-key-1')];   
> => (column=746573742d636f6c, value=746573742d76616c7565, timestamp=1317249361722000)
> Returned 1 results.
> tried with pycassaShell:
> >>> col_fam.get('test-key-1',read_consistency_level=pycassa.ConsistencyLevel.EACH_QUORUM)
> OrderedDict([('test-col', 'test-value')])

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira