public boolean isOffline() { return tracker.isDummy(); }
public boolean isOffline() { return tracker.isDummy(); }
public boolean isOffline() { return tracker.isDummy(); }
public boolean isOffline() { return tracker.isDummy(); }
public Throwable dropSSTablesIfInvalid(Throwable accumulate) { if (!isDummy() && !cfstore.isValid()) accumulate = dropSSTables(accumulate); return accumulate; }
public Throwable dropSSTablesIfInvalid(Throwable accumulate) { if (!isDummy() && !cfstore.isValid()) accumulate = dropSSTables(accumulate); return accumulate; }
public Throwable dropSSTablesIfInvalid(Throwable accumulate) { if (!isDummy() && !cfstore.isValid()) accumulate = dropSSTables(accumulate); return accumulate; }
public Throwable dropSSTablesIfInvalid(Throwable accumulate) { if (!isDummy() && !cfstore.isValid()) accumulate = dropSSTables(accumulate); return accumulate; }
Throwable updateSizeTracking(Iterable<SSTableReader> oldSSTables, Iterable<SSTableReader> newSSTables, Throwable accumulate) if (isDummy()) return accumulate;
public void run() { if (tracker != null && !tracker.isDummy()) SystemKeyspace.clearSSTableReadMeter(desc.ksname, desc.cfname, desc.generation); try { // If we can't successfully delete the DATA component, set the task to be retried later: see TransactionTidier File datafile = new File(desc.filenameFor(Component.DATA)); if (datafile.exists()) delete(datafile); else if (!wasNew) logger.error("SSTableTidier ran with no existing data file for an sstable that was not new"); // let the remainder be cleaned up by delete SSTable.delete(desc, SSTable.discoverComponentsFor(desc)); } catch (Throwable t) { logger.error("Failed deletion for {}, we'll retry after GC and on server restart", desc); failedDeletions.add(this); return; } if (tracker != null && tracker.cfstore != null && !wasNew) tracker.cfstore.metric.totalDiskSpaceUsed.dec(sizeOnDisk); // release the referent to the parent so that the all transaction files can be released parentRef.release(); }
public void run() { if (tracker != null && !tracker.isDummy()) SystemKeyspace.clearSSTableReadMeter(desc.ksname, desc.cfname, desc.generation); try { // If we can't successfully delete the DATA component, set the task to be retried later: see TransactionTidier File datafile = new File(desc.filenameFor(Component.DATA)); if (datafile.exists()) delete(datafile); else if (!wasNew) logger.error("SSTableTidier ran with no existing data file for an sstable that was not new"); // let the remainder be cleaned up by delete SSTable.delete(desc, SSTable.discoverComponentsFor(desc)); } catch (Throwable t) { logger.error("Failed deletion for {}, we'll retry after GC and on server restart", desc); failedDeletions.add(this); return; } if (tracker != null && tracker.cfstore != null && !wasNew) tracker.cfstore.metric.totalDiskSpaceUsed.dec(sizeOnDisk); // release the referent to the parent so that the all transaction files can be released parentRef.release(); }
public void run() { if (tracker != null && !tracker.isDummy()) SystemKeyspace.clearSSTableReadMeter(desc.ksname, desc.cfname, desc.generation); try { // If we can't successfully delete the DATA component, set the task to be retried later: see TransactionTidier File datafile = new File(desc.filenameFor(Component.DATA)); if (datafile.exists()) delete(datafile); else if (!wasNew) logger.error("SSTableTidier ran with no existing data file for an sstable that was not new"); // let the remainder be cleaned up by delete SSTable.delete(desc, SSTable.discoverComponentsFor(desc)); } catch (Throwable t) { logger.error("Failed deletion for {}, we'll retry after GC and on server restart", desc); failedDeletions.add(this); return; } if (tracker != null && tracker.cfstore != null && !wasNew) tracker.cfstore.metric.totalDiskSpaceUsed.dec(sizeOnDisk); // release the referent to the parent so that the all transaction files can be released parentRef.release(); }
public void run() { if (tracker != null && !tracker.isDummy()) SystemKeyspace.clearSSTableReadMeter(desc.ksname, desc.cfname, desc.generation); try { // If we can't successfully delete the DATA component, set the task to be retried later: see TransactionTidier File datafile = new File(desc.filenameFor(Component.DATA)); if (datafile.exists()) delete(datafile); else if (!wasNew) logger.error("SSTableTidier ran with no existing data file for an sstable that was not new"); // let the remainder be cleaned up by delete SSTable.delete(desc, SSTable.discoverComponentsFor(desc)); } catch (Throwable t) { logger.error("Failed deletion for {}, we'll retry after GC and on server restart", desc); failedDeletions.add(this); return; } if (tracker != null && tracker.cfstore != null && !wasNew) tracker.cfstore.metric.totalDiskSpaceUsed.dec(sizeOnDisk); // release the referent to the parent so that the all transaction files can be released parentRef.release(); }
public void replaceFlushed(Memtable memtable, Iterable<SSTableReader> sstables) { assert !isDummy(); if (Iterables.isEmpty(sstables)) { // sstable may be null if we flushed batchlog and nothing needed to be retained // if it's null, we don't care what state the cfstore is in, we just replace it and continue apply(View.replaceFlushed(memtable, null)); return; } sstables.forEach(SSTableReader::setupOnline); // back up before creating a new Snapshot (which makes the new one eligible for compaction) maybeIncrementallyBackup(sstables); apply(View.replaceFlushed(memtable, sstables)); Throwable fail; fail = updateSizeTracking(emptySet(), sstables, null); notifyDiscarded(memtable); // TODO: if we're invalidated, should we notifyadded AND removed, or just skip both? fail = notifyAdded(sstables, memtable, fail); if (!isDummy() && !cfstore.isValid()) dropSSTables(); maybeFail(fail); }
public void replaceFlushed(Memtable memtable, Iterable<SSTableReader> sstables) { assert !isDummy(); if (Iterables.isEmpty(sstables)) { // sstable may be null if we flushed batchlog and nothing needed to be retained // if it's null, we don't care what state the cfstore is in, we just replace it and continue apply(View.replaceFlushed(memtable, null)); return; } sstables.forEach(SSTableReader::setupOnline); // back up before creating a new Snapshot (which makes the new one eligible for compaction) maybeIncrementallyBackup(sstables); apply(View.replaceFlushed(memtable, sstables)); Throwable fail; fail = updateSizeTracking(emptySet(), sstables, null); notifyDiscarded(memtable); // TODO: if we're invalidated, should we notifyadded AND removed, or just skip both? fail = notifyAdded(sstables, fail); if (!isDummy() && !cfstore.isValid()) dropSSTables(); maybeFail(fail); }
public void addInitialSSTables(Iterable<SSTableReader> sstables) { if (!isDummy()) setupOnline(sstables); apply(updateLiveSet(emptySet(), sstables)); maybeFail(updateSizeTracking(emptySet(), sstables, null)); // no notifications or backup necessary }
public void addInitialSSTables(Iterable<SSTableReader> sstables) { if (!isDummy()) setupOnline(sstables); apply(updateLiveSet(emptySet(), sstables)); maybeFail(updateSizeTracking(emptySet(), sstables, null)); // no notifications or backup necessary }
public void replaceFlushed(Memtable memtable, Iterable<SSTableReader> sstables) { assert !isDummy(); if (Iterables.isEmpty(sstables)) { // sstable may be null if we flushed batchlog and nothing needed to be retained // if it's null, we don't care what state the cfstore is in, we just replace it and continue apply(View.replaceFlushed(memtable, null)); return; } sstables.forEach(SSTableReader::setupOnline); // back up before creating a new Snapshot (which makes the new one eligible for compaction) maybeIncrementallyBackup(sstables); apply(View.replaceFlushed(memtable, sstables)); Throwable fail; fail = updateSizeTracking(emptySet(), sstables, null); notifyDiscarded(memtable); // TODO: if we're invalidated, should we notifyadded AND removed, or just skip both? fail = notifyAdded(sstables, fail); if (!isDummy() && !cfstore.isValid()) dropSSTables(); maybeFail(fail); }
public void addInitialSSTables(Iterable<SSTableReader> sstables) { if (!isDummy()) setupOnline(sstables); apply(updateLiveSet(emptySet(), sstables)); maybeFail(updateSizeTracking(emptySet(), sstables, null)); // no notifications or backup necessary }
public void addInitialSSTables(Iterable<SSTableReader> sstables) { if (!isDummy()) setupOnline(sstables); apply(updateLiveSet(emptySet(), sstables)); maybeFail(updateSizeTracking(emptySet(), sstables, null)); // no notifications or backup necessary }