blambov commented on code in PR #2423:
URL: https://github.com/apache/cassandra/pull/2423#discussion_r1246365989


##########
src/java/org/apache/cassandra/db/compaction/CompactionManager.java:
##########
@@ -680,12 +680,25 @@ public AllSSTableOpStatus performGarbageCollection(final 
ColumnFamilyStore cfSto
             @Override
             public Iterable<SSTableReader> filterSSTables(LifecycleTransaction 
transaction)
             {
-                Iterable<SSTableReader> originals = transaction.originals();
+                List<SSTableReader> filteredSSTables = new ArrayList<>();
                 if 
(cfStore.getCompactionStrategyManager().onlyPurgeRepairedTombstones())
-                    originals = Iterables.filter(originals, 
SSTableReader::isRepaired);
-                List<SSTableReader> sortedSSTables = 
Lists.newArrayList(originals);
-                Collections.sort(sortedSSTables, 
SSTableReader.maxTimestampAscending);
-                return sortedSSTables;
+                    for (SSTableReader sstable : transaction.originals())

Review Comment:
   Nit: Multi-line cases are usually enclosed in {}. In this case there's some 
potential for confusion about the else case on 697, thus at least the for cycle 
needs to be in a block.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to