/** * new readers that haven't appeared previously (either in the original set or the logged updates) */ private Iterable<SSTableReader> fresh() { return filterOut(staged.update, originals, logged.update); }
/** * new readers that haven't appeared previously (either in the original set or the logged updates) */ private Iterable<SSTableReader> fresh() { return filterOut(staged.update, originals, logged.update); }
/** * new readers that haven't appeared previously (either in the original set or the logged updates) */ private Iterable<SSTableReader> fresh() { return filterOut(staged.update, originals, logged.update); }
/** * new readers that haven't appeared previously (either in the original set or the logged updates) */ private Iterable<SSTableReader> fresh() { return filterOut(staged.update, originals, logged.update); }
/** * returns the currently visible readers managed by this transaction */ public Iterable<SSTableReader> current() { // i.e., those that are updates that have been logged (made visible), // and any original readers that have neither been obsoleted nor updated return concat(logged.update, filterOut(originals, logged.update, logged.obsolete)); }
/** * returns the currently visible readers managed by this transaction */ public Iterable<SSTableReader> current() { // i.e., those that are updates that have been logged (made visible), // and any original readers that have neither been obsoleted nor updated return concat(logged.update, filterOut(originals, logged.update, logged.obsolete)); }
/** * returns the currently visible readers managed by this transaction */ public Iterable<SSTableReader> current() { // i.e., those that are updates that have been logged (made visible), // and any original readers that have neither been obsoleted nor updated return concat(logged.update, filterOut(originals, logged.update, logged.obsolete)); }
@VisibleForTesting public Iterable<SSTableReader> allKnownSSTables() { return Iterables.concat(sstables, filterOut(compacting, sstables)); }
@VisibleForTesting public Iterable<SSTableReader> allKnownSSTables() { return Iterables.concat(sstables, filterOut(compacting, sstables)); }
@VisibleForTesting public Iterable<SSTableReader> allKnownSSTables() { return Iterables.concat(sstables, filterOut(compacting, sstables)); }
/** * returns the currently visible readers managed by this transaction */ public Iterable<SSTableReader> current() { // i.e., those that are updates that have been logged (made visible), // and any original readers that have neither been obsoleted nor updated return concat(logged.update, filterOut(originals, logged.update, logged.obsolete)); }
private Throwable checkpoint(Throwable accumulate) { if (logger.isTraceEnabled()) logger.trace("Checkpointing staged {}", staged); if (staged.isEmpty()) return accumulate; Set<SSTableReader> toUpdate = toUpdate(); Set<SSTableReader> fresh = copyOf(fresh()); // check the current versions of the readers we're replacing haven't somehow been replaced by someone else checkNotReplaced(filterIn(toUpdate, staged.update)); // ensure any new readers are in the compacting set, since we aren't done with them yet // and don't want anyone else messing with them // apply atomically along with updating the live set of readers tracker.apply(compose(updateCompacting(emptySet(), fresh), updateLiveSet(toUpdate, staged.update))); // log the staged changes and our newly marked readers marked.addAll(fresh); logged.log(staged); // setup our tracker, and mark our prior versions replaced, also releasing our references to them // we do not replace/release obsoleted readers, since we may need to restore them on rollback accumulate = setReplaced(filterOut(toUpdate, staged.obsolete), accumulate); accumulate = release(selfRefs(filterOut(toUpdate, staged.obsolete)), accumulate); staged.clear(); return accumulate; }
private Throwable checkpoint(Throwable accumulate) { if (logger.isTraceEnabled()) logger.trace("Checkpointing staged {}", staged); if (staged.isEmpty()) return accumulate; Set<SSTableReader> toUpdate = toUpdate(); Set<SSTableReader> fresh = copyOf(fresh()); // check the current versions of the readers we're replacing haven't somehow been replaced by someone else checkNotReplaced(filterIn(toUpdate, staged.update)); // ensure any new readers are in the compacting set, since we aren't done with them yet // and don't want anyone else messing with them // apply atomically along with updating the live set of readers tracker.apply(compose(updateCompacting(emptySet(), fresh), updateLiveSet(toUpdate, staged.update))); // log the staged changes and our newly marked readers marked.addAll(fresh); logged.log(staged); // setup our tracker, and mark our prior versions replaced, also releasing our references to them // we do not replace/release obsoleted readers, since we may need to restore them on rollback accumulate = setReplaced(filterOut(toUpdate, staged.obsolete), accumulate); accumulate = release(selfRefs(filterOut(toUpdate, staged.obsolete)), accumulate); staged.clear(); return accumulate; }
private Throwable checkpoint(Throwable accumulate) { if (logger.isTraceEnabled()) logger.trace("Checkpointing staged {}", staged); if (staged.isEmpty()) return accumulate; Set<SSTableReader> toUpdate = toUpdate(); Set<SSTableReader> fresh = copyOf(fresh()); // check the current versions of the readers we're replacing haven't somehow been replaced by someone else checkNotReplaced(filterIn(toUpdate, staged.update)); // ensure any new readers are in the compacting set, since we aren't done with them yet // and don't want anyone else messing with them // apply atomically along with updating the live set of readers tracker.apply(compose(updateCompacting(emptySet(), fresh), updateLiveSet(toUpdate, staged.update))); // log the staged changes and our newly marked readers marked.addAll(fresh); logged.log(staged); // setup our tracker, and mark our prior versions replaced, also releasing our references to them // we do not replace/release obsoleted readers, since we may need to restore them on rollback accumulate = setReplaced(filterOut(toUpdate, staged.obsolete), accumulate); accumulate = release(selfRefs(filterOut(toUpdate, staged.obsolete)), accumulate); staged.clear(); return accumulate; }
Iterable<SSTableReader> obsolete = filterOut(concatUniq(staged.update, logged.update), originals); logger.trace("Obsoleting {}", obsolete);
private Throwable checkpoint(Throwable accumulate) { if (logger.isTraceEnabled()) logger.trace("Checkpointing staged {}", staged); if (staged.isEmpty()) return accumulate; Set<SSTableReader> toUpdate = toUpdate(); Set<SSTableReader> fresh = copyOf(fresh()); // check the current versions of the readers we're replacing haven't somehow been replaced by someone else checkNotReplaced(filterIn(toUpdate, staged.update)); // ensure any new readers are in the compacting set, since we aren't done with them yet // and don't want anyone else messing with them // apply atomically along with updating the live set of readers tracker.apply(compose(updateCompacting(emptySet(), fresh), updateLiveSet(toUpdate, staged.update))); // log the staged changes and our newly marked readers marked.addAll(fresh); logged.log(staged); // setup our tracker, and mark our prior versions replaced, also releasing our references to them // we do not replace/release obsoleted readers, since we may need to restore them on rollback accumulate = setReplaced(filterOut(toUpdate, staged.obsolete), accumulate); accumulate = release(selfRefs(filterOut(toUpdate, staged.obsolete)), accumulate); staged.clear(); return accumulate; }
Iterable<SSTableReader> obsolete = filterOut(concatUniq(staged.update, logged.update), originals); logger.trace("Obsoleting {}", obsolete);
Iterable<SSTableReader> obsolete = filterOut(concatUniq(staged.update, logged.update), originals); logger.trace("Obsoleting {}", obsolete);
Iterable<SSTableReader> obsolete = filterOut(concatUniq(staged.update, logged.update), originals); logger.trace("Obsoleting {}", obsolete);