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

Remove unclear indexes() method from 2ndary index API

    XMLWordPrintableJSON

Details

    Description

      The new secondary index API does not notify indexes of single-row or slice deletions unless specific columns are deleted. I believe the problem is that in SecondaryIndexManager.newUpdateTransaction(), we skip indexes unless index.indexes(update.columns()). When no columns are specified in the the deletion, update.columns() is empty, which causes all indexes to be skipped.

      I think the correct fix is to do something like this in the ModificationStatement constructor:

      if (type == StatementType.DELETE && modifiedColumns.isEmpty())
          modifiedColumns = cfm.partitionColumns();
      

      However, I'm not sure if that may have unintended side-effects. What do you think, slebresne?

      Attachments

        Issue Links

          Activity

            People

              slebresne Sylvain Lebresne
              thobbs Tom Hobbs
              Sylvain Lebresne
              Sam Tunnicliffe
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: