mirror of https://github.com/apache/cassandra
Don't purge columns during upgradesstables
patch by slebresne; reviewed by jbellis for CASSANDRA-4462
This commit is contained in:
parent
1ad710b6ea
commit
7ff8e3c384
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue