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

Dropping an index does not invalidate prepared statements anymore

    XMLWordPrintableJSON

Details

    • Normal

    Description

      When we drop an index, we should invalidate (SELECT) statements on the base table as those may involve the index (and, for instance, validating an index exists is done a preparation time in SELECT, so a SELECT does potentially become invalid if an index is dropped). As far as I can tell, this is properly done in pre-3.0, because CFMetaData.apply will return true which will trigger the statements invalidations. And that is because, before 3.0, index definitions are part of the ColumnDefinition of the base table and thus dropping an index is (rightfullly in a way) considered by CFMetaData as a change to the table columns. In 3.0 however, as indexes has been moved out of ColumnDefinition, CFMetaData.apply returns false in that case and statements are not invalidated.

      I'll note that the changes to CQLTester done in CASSANDRA-10631 actually expose this problem (but indirectly so we should create a purpose built tests for this).

      Attachments

        Activity

          People

            samt Sam Tunnicliffe
            slebresne Sylvain Lebresne
            Sam Tunnicliffe
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: