Details
-
Bug
-
Status: Resolved
-
Normal
-
Resolution: Fixed
-
None
-
Degradation - Other Exception
-
Low
-
Low Hanging Fruit
-
Unit Test
-
All
-
None
-
Description
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:
Queries using 2ndary indexes don't support selecting only static columns
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.