Skip to content

Commit

Permalink
comment
Browse files Browse the repository at this point in the history
  • Loading branch information
wi11dey committed Oct 31, 2024
1 parent f823fcd commit a6d9082
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,13 @@

package com.palantir.cassandra.db;

import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.UUID;
import java.util.concurrent.CopyOnWriteArrayList;

import com.palantir.cassandra.db.compaction.IColumnFamilyStoreWriteAheadLogger;
import org.apache.cassandra.config.CFMetaData;
import org.apache.cassandra.io.sstable.Descriptor;
import org.apache.cassandra.utils.Pair;


public class ColumnFamilyStoreManager implements IColumnFamilyStoreValidator, IColumnFamilyStoreWriteAheadLogger
Expand Down Expand Up @@ -68,8 +63,8 @@ public Map<Descriptor, Set<Integer>> filterValidAncestors(CFMetaData cfMetaData,
}

@Override
public boolean shouldRemoveUnusedSstables() {
return validator.shouldRemoveUnusedSstables();
public boolean shouldRemoveUnusedSstablesBasedOnAncestorMetadata() {
return validator.shouldRemoveUnusedSstablesBasedOnAncestorMetadata();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Map<Descriptor, Set<Integer>> filterValidAncestors(CFMetaData cfMetaData,
* {@link org.apache.cassandra.db.ColumnFamilyStore#removeUnusedSstables(CFMetaData, Map)}, false otherwise
* (e.g. if a different cleanup system is being used outside of {@link org.apache.cassandra.service.CassandraDaemon}).
*/
default boolean shouldRemoveUnusedSstables() {
default boolean shouldRemoveUnusedSstablesBasedOnAncestorMetadata() {
return true;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import java.util.UUID;
import java.util.concurrent.TimeUnit;
import java.util.function.BiFunction;
import java.util.stream.Collectors;

import com.google.common.base.Predicate;
import com.google.common.collect.Iterables;
Expand Down
2 changes: 1 addition & 1 deletion src/java/org/apache/cassandra/service/CassandraDaemon.java
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ private void completeSetupMayThrowSstableException() {

for (CFMetaData cfm : Schema.instance.getKeyspaceMetaData(keyspaceName).values())
{
if (ColumnFamilyStoreManager.instance.shouldRemoveUnusedSstables()) {
if (ColumnFamilyStoreManager.instance.shouldRemoveUnusedSstablesBasedOnAncestorMetadata()) {
ColumnFamilyStore.removeUnusedSstables(cfm, unfinishedCompactions.getOrDefault(cfm.ksAndCFName, ImmutableMap.of()));
}
ColumnFamilyStore.scrubDataDirectories(cfm);
Expand Down

0 comments on commit a6d9082

Please sign in to comment.