mirror of https://github.com/apache/cassandra
Avoid creating empty and non-cleaned write during compaction
patch by slebresne; reviewed by jbellis for CASSANDRA-3616 git-svn-id: https://svn.apache.org/repos/asf/cassandra/branches/cassandra-1.0@1220665 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
dcf893eb88
commit
c6e1e5029b
|
|
@ -3,6 +3,7 @@
|
|||
* more efficient allocation of small bloom filters (CASSANDRA-3618)
|
||||
* CLibrary.createHardLinkWithExec() to check for errors (CASSANDRA-3101)
|
||||
* fsync the directory after new sstable or commitlog segment are created (CASSANDRA-3250)
|
||||
* Avoid creating empty and non cleaned writer during compaction (CASSANDRA-3616)
|
||||
Merged from 0.8:
|
||||
* prevent new nodes from thinking down nodes are up forever (CASSANDRA-3626)
|
||||
|
||||
|
|
|
|||
|
|
@ -175,9 +175,12 @@ public class CompactionTask extends AbstractCompactionTask
|
|||
SSTableReader toIndex = writer.closeAndOpenReader(getMaxDataAge(toCompact));
|
||||
cachedKeyMap.put(toIndex, cachedKeys);
|
||||
sstables.add(toIndex);
|
||||
writer = cfs.createCompactionWriter(keysPerSSTable, compactionFileLocation, toCompact);
|
||||
writers.add(writer);
|
||||
cachedKeys = new HashMap<DecoratedKey, Long>();
|
||||
if (nni.hasNext())
|
||||
{
|
||||
writer = cfs.createCompactionWriter(keysPerSSTable, compactionFileLocation, toCompact);
|
||||
writers.add(writer);
|
||||
cachedKeys = new HashMap<DecoratedKey, Long>();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue