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

Sylvain Lebresne updated CASSANDRA-15906:
-----------------------------------------
    Test and Documentation Plan: upgrade dtest included
                         Status: Patch Available  (was: Open)

The fix is pretty simple, we can just skip the validation if the table has a 
KEYS index. More importantly, I've added a dtest to test the upgrade path of 
KEYS 2i to 4.0, which in particular demonstrates the problem described (as DROP 
COMPACT STORAGE is part of that upgrade path).
||C* patch||dtest patch||CI||
|[3.0|https://github.com/pcmanus/cassandra/commits/C-15906-3.0]|[dtest|https://github.com/pcmanus/cassandra-dtest/commits/test_keys_2i_upgrade]|[#169|https://ci-cassandra.apache.org/job/Cassandra-devbranch/169/]|

Note that there is only a 3.0 patch since as said in the description, 3.11+ is 
not affected.


> Queries on KEYS 2i are broken by DROP COMPACT STORAGE on 3.0
> ------------------------------------------------------------
>
>                 Key: CASSANDRA-15906
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-15906
>             Project: Cassandra
>          Issue Type: Bug
>          Components: CQL/Interpreter
>            Reporter: Sylvain Lebresne
>            Assignee: Sylvain Lebresne
>            Priority: Normal
>
> From 3.0 onwards, the declared columns of a thrift table are internally 
> static columns. While the table is compact, this 
> After DROP COMPACT STORAGE is used on a table that has a KEYS 2i, queries 
> that uses that index will start failing with:
> {noformat}
> Queries using 2ndary indexes don't support selecting only static columns
> {noformat}
> In 3.0, we don't support index on static columns and have that validation 
> that rejects 2i queries on static columns. But the declared columns of 
> compact table are static under the hood, and while this specific validation 
> is skipped while the table is compact, it isn't anymore after the DROP 
> COMPACT STORAGE.
> Note that internally, nothing changes with the DROP COMPACT STORAGE, and the 
> 2i queries would still work as well as before, it is just that they are 
> rejected.
> Also not that this is only a problem in 3.0. In 3.11, static column indexes 
> were added (CASSANDRA-8103) and thus this validation has been removed, and 
> everything works as it should.
> However, since DROP COMPACT STORAGE is a mandatory step for compact tables 
> before upgrading to 4.0, fixing this annoying in 3.0 would avoid forcing 
> users with KEYS 2i on 3.0 to upgrade to 3.11 before going to 4.0.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to