Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-15906

Queries on KEYS 2i are broken by DROP COMPACT STORAGE on 3.0

    XMLWordPrintableJSON

Details

    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.

      Attachments

        Activity

          People

            slebresne Sylvain Lebresne
            slebresne Sylvain Lebresne
            Sylvain Lebresne
            Brandon Williams
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 0.5h
                0.5h