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

Should not search for the index of a column if the table is not using secondaryIndex.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Normal
    • Resolution: Fixed
    • 2.2.6
    • Local/Compaction
    • None
    • Normal

    Description

      We are not using secondary index in our cluster, but when I profile the compaction, I find that ~5.5% of the compaction time is spent on this line of the code function LazilyCompactedRow.Reducer.reduce():

      if (cell.isLive() && !container.getColumn(cell.name()).equals(cell))

      before this line there is check to skip the look up, which seems to be not working:

      // skip the index-update checks if there is no indexing needed since they are a bit expensive
      if (indexer == SecondaryIndexManager.nullUpdater)
      return;

      My patch is to set the indexer to be nullUpdater if the table has no associated index.

      Let me know if it's the right fix.

      Attachments

        Activity

          People

            dikanggu Dikang Gu
            dikanggu Dikang Gu
            Dikang Gu
            Sam Tunnicliffe
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: