You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "David Capwell (Jira)" <ji...@apache.org> on 2024/07/08 17:24:00 UTC

[jira] [Updated] (CASSANDRA-19759) CEP-15 (Accord): When starting a transaction in a table where Accord is not enabled, should fail fast rather than fail with lack of ranges

     [ https://issues.apache.org/jira/browse/CASSANDRA-19759?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Capwell updated CASSANDRA-19759:
--------------------------------------
     Bug Category: Parent values: Documentation(13562)
       Complexity: Low Hanging Fruit
    Discovered By: User Report
    Fix Version/s: NA
         Severity: Critical
           Status: Open  (was: Triage Needed)

> CEP-15 (Accord): When starting a transaction in a table where Accord is not enabled, should fail fast rather than fail with lack of ranges
> ------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-19759
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-19759
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Accord
>            Reporter: David Capwell
>            Priority: Normal
>             Fix For: NA
>
>
> Reported in Slack: https://the-asf.slack.com/archives/C0459N9R5C6/p1712831271287869
> The “accord_demo.txt” has the following
> {code}
> ccm create accord-cql-poc -n 3
> ccm start
> bin/cqlsh -e "create keyspace ks with replication={'class':'SimpleStrategy', 'replication_factor':3};"
> bin/cqlsh -e "create table ks.tbl1 (k int primary key, v int);"
> bin/cqlsh -e "create table ks.tbl2 (k int primary key, v int);"
> bin/nodetool -h 0000:0000:0000:0000:0000:ffff:7f00:0001 -p 7100 createepochunsafe
> bin/nodetool -h 0000:0000:0000:0000:0000:ffff:7f00:0001 -p 7200 createepochunsafe
> bin/nodetool -h 0000:0000:0000:0000:0000:ffff:7f00:0001 -p 7300 createepochunsafe
> BEGIN TRANSACTION
>   LET row1 = (SELECT * FROM ks.tbl1 WHERE k = 1);
>   SELECT row1.v;
>   IF row1 IS NULL THEN
>     INSERT INTO ks.tbl1 (k, v) VALUES (1, 2);
>   END IF
> COMMIT TRANSACTION;
> {code}
> If you run that it fails in an unclear way
> {code}
> cqlsh> BEGIN TRANSACTION
>    ...   LET row1 = (SELECT * FROM ks.tbl1 WHERE k = 1);
>    ...   SELECT row1.v;
>    ...   IF row1 IS NULL THEN
>    ...     INSERT INTO ks.tbl1 (k, v) VALUES (1, 2);
>    ...   END IF
>    ... COMMIT TRANSACTION;
> NoHostAvailable: ('Unable to complete the operation against any hosts', {<Host: 127.0.0.1:9042 datacenter1>: <Error from server: code=0000 [Server error] message="java.lang.IllegalStateException: Unable to select a HomeKey as the topology does not have any ranges for epoch 17">})
> {code}
> The issue is that the table was not marked as an Accord table; aka missing 
> {code}
> WITH transactional_mode='full'
> {code}
> The demo should be updated to show this, but the error message should also be improved.  We validate that the table exists but now that the metadata is required we should also enforce this in CQL validation



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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