mirror of https://github.com/apache/cassandra
Reference sstable before populating keycache after compaction
Patch by marcuse; reviewed by thobbs for CASSANDRA-7234
This commit is contained in:
parent
3e5f2bd64e
commit
2df27c0900
|
|
@ -14,6 +14,7 @@
|
|||
* Cqlsh counts non-empty lines for "Blank lines" warning (CASSANDRA-7325)
|
||||
* Make StreamSession#closeSession() idempotent (CASSANDRA-7262)
|
||||
* Fix infinite loop on exception while streaming (CASSANDRA-7330)
|
||||
* Reference sstables before populating key cache (CASSANDRA-7234)
|
||||
Merged from 1.2:
|
||||
* Check internal addresses for seeds (CASSANDRA-6523)
|
||||
* Fix potential / by 0 in HHOM page size calculation (CASSANDRA-7354)
|
||||
|
|
|
|||
|
|
@ -242,7 +242,19 @@ public class CompactionTask extends AbstractCompactionTask
|
|||
replaceCompactedSSTables(toCompact, sstables);
|
||||
// TODO: this doesn't belong here, it should be part of the reader to load when the tracker is wired up
|
||||
for (SSTableReader sstable : sstables)
|
||||
sstable.preheat(cachedKeyMap.get(sstable.descriptor));
|
||||
{
|
||||
if (sstable.acquireReference())
|
||||
{
|
||||
try
|
||||
{
|
||||
sstable.preheat(cachedKeyMap.get(sstable.descriptor));
|
||||
}
|
||||
finally
|
||||
{
|
||||
sstable.releaseReference();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// log a bunch of statistics about the result and save to system table compaction_history
|
||||
long dTime = TimeUnit.NANOSECONDS.toMillis(System.nanoTime() - start);
|
||||
|
|
|
|||
Loading…
Reference in New Issue