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)
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.