smiklosovic commented on code in PR #4300:
URL: https://github.com/apache/cassandra/pull/4300#discussion_r2276007313


##########
src/java/org/apache/cassandra/db/compaction/CompactionTask.java:
##########
@@ -171,7 +177,45 @@ public boolean apply(SSTableReader sstable)
             long inputSizeBytes;
             long timeSpentWritingKeys;
 
+            List<Index> indexesReceptiveToFullyExpiredSSTables = 
cfs.indexManager.listIndexes()
+                                                                               
  .stream()
+                                                                               
  .filter(Index::includeFullyExpiredTablesInCompaction)
+                                                                               
  .collect(Collectors.toList());
+
+            if (!indexesReceptiveToFullyExpiredSSTables.isEmpty() && 
!fullyExpiredSSTables.isEmpty())
+            {
+                try (WriteContext ctx = 
cfs.keyspace.getWriteHandler().createContextForIndexing())
+                {
+                    for (SSTableReader expiredSSTable : fullyExpiredSSTables)
+                    {
+                        expiredSSTable.getScanner()
+                                      .forEachRemaining(partition ->
+                                                        
partition.forEachRemaining(unfiltered -> {
+                                                            if (unfiltered 
instanceof Row)
+                                                            {
+                                                                for (Index 
index : indexesReceptiveToFullyExpiredSSTables)

Review Comment:
   well that is not so easy because `newCompactionTransaction` takes `int 
versions` as third parameter which is by the current execution path resolved in 
`getRowMergeListener` which gets `List<UnfilteredRowIterator> versions`. I am 
not completely sure how to get this stuff in there.



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

Reply via email to