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

Do not rebuild indexes if no columns are actually indexed

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Normal
    • Resolution: Fixed
    • 2.0.15, 2.1.5
    • None
    • None

    Description

      When rebuilding secondary indexes, the index task is executed regardless if the actual SecondaryIndex#indexes(ByteBuffer ) implementation of any index returns true for any column, meaning that the expensive task of going through all sstables and related rows will be executed even if in the end no column/row will be actually indexed.

      This is a huge performance hit when i.e. bootstrapping with large datasets on tables having custom secondary index implementations whose indexes() implementation might return false.

      Attachments

        1. 2.0-CASSANDRA-9196.txt
          6 kB
          Sergio Bossa
        2. 2.1-CASSANDRA-9196.txt
          10 kB
          Sam Tunnicliffe

        Issue Links

          Activity

            People

              sbtourist Sergio Bossa
              sbtourist Sergio Bossa
              Sergio Bossa
              Sam Tunnicliffe
              Votes:
              1 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: