smiklosovic commented on code in PR #4300: URL: https://github.com/apache/cassandra/pull/4300#discussion_r2276116854
########## src/java/org/apache/cassandra/db/compaction/CompactionTask.java: ########## @@ -102,6 +110,43 @@ public boolean reduceScopeForLimitedSpace(Set<SSTableReader> nonExpiredSSTables, return false; } + private void maybeNotifyIndexersAboutRowsInFullyExpiredSSTables(Set<SSTableReader> fullyExpiredSSTables) + { + if (fullyExpiredSSTables.isEmpty()) + return; + + List<Index> indexes = cfs.indexManager.listIndexes() + .stream() + .filter(Index::notifyIndexerAboutRowsInFullyExpiredSSTables) + .collect(Collectors.toList()); + + if (indexes.isEmpty()) + return; + + for (SSTableReader expiredSSTable : fullyExpiredSSTables) + { + expiredSSTable.getScanner() + .forEachRemaining(partition -> + { + partition.forEachRemaining(unfiltered -> { + if (unfiltered instanceof Row) + { + CompactionTransaction transaction = cfs.indexManager.newCompactionTransaction(partition.partitionKey(), + partition.columns(), + 1, + FBUtilities.nowInSeconds(), + // only indexes which matter + indexes); Review Comment: indexes which matter only, which have `notifyIndexerAboutRowsInFullyExpiredSSTables` to be true. I have accommodated `newCompactionTransaction` to pass indexes explicitly. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: pr-unsubscr...@cassandra.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: pr-unsubscr...@cassandra.apache.org For additional commands, e-mail: pr-h...@cassandra.apache.org