Don't purge columns during upgradesstables

patch by slebresne; reviewed by jbellis for CASSANDRA-4462
This commit is contained in:
Sylvain Lebresne 2012-07-27 10:06:33 +02:00
parent 1ad710b6ea
commit 7ff8e3c384
2 changed files with 6 additions and 2 deletions

View File

@ -12,6 +12,7 @@
* fix 1.0.x node join to mixed version cluster, other nodes >= 1.1 (CASSANDRA-4195)
* Fix LCS splitting sstable base on uncompressed size (CASSANDRA-4419)
* Push the validation of secondary index values to the SecondaryIndexManager (CASSANDRA-4240)
* Don't purge columns during upgradesstables (CASSANDRA-4462)
1.0.10
* fix maxTimestamp to include row tombstones (CASSANDRA-4116)

View File

@ -67,6 +67,9 @@ public class CompactionManager implements CompactionManagerMBean
private static final Logger logger = LoggerFactory.getLogger(CompactionManager.class);
public static final CompactionManager instance;
public static final int NO_GC = Integer.MIN_VALUE;
public static final int GC_ALL = Integer.MAX_VALUE;
/**
* compactionLock has two purposes:
* - Compaction acquires its readLock so that multiple compactions can happen simultaneously,
@ -238,7 +241,7 @@ public class CompactionManager implements CompactionManagerMBean
{
// SSTables are marked by the caller
// NOTE: it is important that the task create one and only one sstable, even for Leveled compaction (see LeveledManifest.replace())
CompactionTask task = new CompactionTask(cfs, Collections.singletonList(sstable), Integer.MAX_VALUE);
CompactionTask task = new CompactionTask(cfs, Collections.singletonList(sstable), NO_GC);
task.isUserDefined(true);
task.setCompactionType(OperationType.UPGRADE_SSTABLES);
task.execute(executor);
@ -974,7 +977,7 @@ public class CompactionManager implements CompactionManagerMBean
static int getDefaultGcBefore(ColumnFamilyStore cfs)
{
return cfs.isIndex()
? Integer.MAX_VALUE
? GC_ALL
: (int) (System.currentTimeMillis() / 1000) - cfs.metadata.getGcGraceSeconds();
}