mirror of https://github.com/apache/cassandra
change snapshot-before-compaction to only snapshot (w/o flush) CFS being compacted
patch by jbellis; reviewed by slebresne for CASSANDRA-3803
This commit is contained in:
parent
d9ed037878
commit
22b8a9725b
|
|
@ -1,3 +1,8 @@
|
||||||
|
1.0.9
|
||||||
|
* Only snapshot CF being compacted for snapshot_before_compaction
|
||||||
|
(CASSANDRA-3803)
|
||||||
|
|
||||||
|
|
||||||
1.0.8
|
1.0.8
|
||||||
* Log active compactions in StatusLogger (CASSANDRA-3703)
|
* Log active compactions in StatusLogger (CASSANDRA-3703)
|
||||||
* Compute more accurate compaction score per level (CASSANDRA-3790)
|
* Compute more accurate compaction score per level (CASSANDRA-3790)
|
||||||
|
|
|
||||||
|
|
@ -1389,7 +1389,7 @@ public class ColumnFamilyStore implements ColumnFamilyStoreMBean
|
||||||
return metadata.comparator;
|
return metadata.comparator;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void snapshotWithoutFlush(String snapshotName)
|
public void snapshotWithoutFlush(String snapshotName)
|
||||||
{
|
{
|
||||||
for (ColumnFamilyStore cfs : concatWithIndexes())
|
for (ColumnFamilyStore cfs : concatWithIndexes())
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -100,7 +100,7 @@ public class CompactionTask extends AbstractCompactionTask
|
||||||
}
|
}
|
||||||
|
|
||||||
if (DatabaseDescriptor.isSnapshotBeforeCompaction())
|
if (DatabaseDescriptor.isSnapshotBeforeCompaction())
|
||||||
cfs.table.snapshot(System.currentTimeMillis() + "-" + "compact-" + cfs.columnFamily);
|
cfs.snapshotWithoutFlush(System.currentTimeMillis() + "-" + "compact-" + cfs.columnFamily);
|
||||||
|
|
||||||
// sanity check: all sstables must belong to the same cfs
|
// sanity check: all sstables must belong to the same cfs
|
||||||
for (SSTableReader sstable : toCompact)
|
for (SSTableReader sstable : toCompact)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue