mirror of https://github.com/apache/cassandra
collect secondary index tombstones immediately
patch by jbellis; reviewed by tjake for CASSANDRA-1914 git-svn-id: https://svn.apache.org/repos/asf/cassandra/branches/cassandra-0.7@1053682 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
414d2e4fec
commit
9b3fbc816c
|
|
@ -17,6 +17,7 @@ dev
|
|||
* allow [LOCAL|EACH]_QUORUM to be used with non-NetworkTopology
|
||||
replication Strategies
|
||||
* increased amount of index locks for faster commitlog replay
|
||||
* collect secondary index tombstones immediately (CASSANDRA-1914)
|
||||
|
||||
|
||||
0.7.0-rc3
|
||||
|
|
|
|||
|
|
@ -1958,4 +1958,9 @@ public class ColumnFamilyStore implements ColumnFamilyStoreMBean
|
|||
return indexes;
|
||||
}
|
||||
|
||||
/** true if this CFS contains secondary index data */
|
||||
public boolean isIndex()
|
||||
{
|
||||
return partitioner instanceof LocalPartitioner;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -116,7 +116,12 @@ public class CompactionManager implements CompactionManagerMBean
|
|||
// if we have too many to compact all at once, compact older ones first -- this avoids
|
||||
// re-compacting files we just created.
|
||||
Collections.sort(sstables);
|
||||
return doCompaction(cfs, sstables.subList(0, Math.min(sstables.size(), maxThreshold)), (int) (System.currentTimeMillis() / 1000) - cfs.metadata.getGcGraceSeconds());
|
||||
int gcBefore = cfs.isIndex()
|
||||
? Integer.MAX_VALUE
|
||||
: (int) (System.currentTimeMillis() / 1000) - cfs.metadata.getGcGraceSeconds();
|
||||
return doCompaction(cfs,
|
||||
sstables.subList(0, Math.min(sstables.size(), maxThreshold)),
|
||||
gcBefore);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue