Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix resurrection by hanging ref and deletion by invalidated ancestry #541

Open
wants to merge 9 commits into
base: palantir-cassandra-2.2.18
Choose a base branch
from
Prev Previous commit
dry run ability
  • Loading branch information
wi11dey committed Sep 6, 2024
commit 898502e34d90ad12485dcbe3673f05f492eed81e
11 changes: 9 additions & 2 deletions src/java/org/apache/cassandra/db/ColumnFamilyStore.java
Original file line number Diff line number Diff line change
@@ -743,8 +743,15 @@ public static void removeUnfinishedCompactionLeftovers(CFMetaData metadata, Map<
if (completedAncestors.contains(desc.generation))
{
// if any of the ancestors were participating in a compaction, finish that compaction
logger.info("Going to delete leftover compaction ancestor {}", desc);
SSTable.delete(desc, sstableFiles.getValue());
if (Boolean.getBoolean("palantir_cassandra.dry_run_ancestor_deletion"))
{
logger.info("Would have deleted leftover compaction ancestor {} if palantir_cassandra.dry_run_ancestor_deletion was false", desc);
}
else
{
logger.info("Going to delete leftover compaction ancestor {}", desc);
SSTable.delete(desc, sstableFiles.getValue());
}
UUID compactionTaskID = unfinishedCompactions.get(desc.generation);
if (compactionTaskID != null)
SystemKeyspace.finishCompaction(unfinishedCompactions.get(desc.generation));