Dikang Gu created CASSANDRA-11450:
-------------------------------------

             Summary: Should not search for the index of a column if the table 
is not using secondaryIndex.
                 Key: CASSANDRA-11450
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-11450
             Project: Cassandra
          Issue Type: Bug
          Components: Compaction
            Reporter: Dikang Gu
             Fix For: 2.2.x


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.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to