mirror of https://github.com/apache/cassandra
Merge branch 'cassandra-3.0' into cassandra-3.11
This commit is contained in:
commit
817f3c282d
|
|
@ -26,6 +26,8 @@ Merged from 3.0:
|
|||
* Provide a JMX call to sync schema with local storage (CASSANDRA-13954)
|
||||
* Mishandling of cells for removed/dropped columns when reading legacy files (CASSANDRA-13939)
|
||||
* Deserialise sstable metadata in nodetool verify (CASSANDRA-13922)
|
||||
Merged from 2.2:
|
||||
* Grab refs during scrub/index redistribution/cleanup (CASSANDRA-13873)
|
||||
|
||||
|
||||
3.11.1
|
||||
|
|
|
|||
|
|
@ -1097,6 +1097,7 @@ public class CompactionManager implements CompactionManagerMBean
|
|||
try (SSTableRewriter writer = SSTableRewriter.construct(cfs, txn, false, sstable.maxDataAge);
|
||||
ISSTableScanner scanner = cleanupStrategy.getScanner(sstable, null);
|
||||
CompactionController controller = new CompactionController(cfs, txn.originals(), getDefaultGcBefore(cfs, nowInSec));
|
||||
Refs<SSTableReader> refs = Refs.ref(Collections.singleton(sstable));
|
||||
CompactionIterator ci = new CompactionIterator(OperationType.CLEANUP, Collections.singletonList(scanner), controller, nowInSec, UUIDGen.getTimeUUID(), metrics))
|
||||
{
|
||||
writer.switchWriter(createWriter(cfs, compactionFileLocation, expectedBloomFilterSize, sstable.getSSTableMetadata().repairedAt, sstable, txn));
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ import org.apache.cassandra.io.util.FileUtils;
|
|||
import org.apache.cassandra.io.util.RandomAccessReader;
|
||||
import org.apache.cassandra.service.ActiveRepairService;
|
||||
import org.apache.cassandra.utils.*;
|
||||
import org.apache.cassandra.utils.concurrent.Refs;
|
||||
|
||||
public class Scrubber implements Closeable
|
||||
{
|
||||
|
|
@ -142,7 +143,8 @@ public class Scrubber implements Closeable
|
|||
List<SSTableReader> finished = new ArrayList<>();
|
||||
boolean completed = false;
|
||||
outputHandler.output(String.format("Scrubbing %s (%s)", sstable, FBUtilities.prettyPrintMemory(dataFile.length())));
|
||||
try (SSTableRewriter writer = SSTableRewriter.construct(cfs, transaction, false, sstable.maxDataAge))
|
||||
try (SSTableRewriter writer = SSTableRewriter.construct(cfs, transaction, false, sstable.maxDataAge);
|
||||
Refs<SSTableReader> refs = Refs.ref(Collections.singleton(sstable)))
|
||||
{
|
||||
nextIndexKey = indexAvailable() ? ByteBufferUtil.readWithShortLength(indexFile) : null;
|
||||
if (indexAvailable())
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@ import org.apache.cassandra.db.lifecycle.LifecycleTransaction;
|
|||
import org.apache.cassandra.io.sstable.format.SSTableReader;
|
||||
import org.apache.cassandra.utils.FBUtilities;
|
||||
import org.apache.cassandra.utils.Pair;
|
||||
import org.apache.cassandra.utils.concurrent.Refs;
|
||||
|
||||
import static org.apache.cassandra.io.sstable.Downsampling.BASE_SAMPLING_LEVEL;
|
||||
|
||||
|
|
@ -124,11 +125,14 @@ public class IndexSummaryRedistribution extends CompactionInfo.Holder
|
|||
|
||||
logger.trace("Index summaries for compacting SSTables are using {} MB of space",
|
||||
(memoryPoolBytes - remainingBytes) / 1024.0 / 1024.0);
|
||||
List<SSTableReader> newSSTables = adjustSamplingLevels(sstablesByHotness, transactions, totalReadsPerSec, remainingBytes);
|
||||
|
||||
for (LifecycleTransaction txn : transactions.values())
|
||||
txn.finish();
|
||||
List<SSTableReader> newSSTables;
|
||||
try (Refs<SSTableReader> refs = Refs.ref(sstablesByHotness))
|
||||
{
|
||||
newSSTables = adjustSamplingLevels(sstablesByHotness, transactions, totalReadsPerSec, remainingBytes);
|
||||
|
||||
for (LifecycleTransaction txn : transactions.values())
|
||||
txn.finish();
|
||||
}
|
||||
total = 0;
|
||||
for (SSTableReader sstable : Iterables.concat(compacting, oldFormatSSTables, newSSTables))
|
||||
total += sstable.getIndexSummaryOffHeapSize();
|
||||
|
|
|
|||
Loading…
Reference in New Issue