private void setTemporary(LogFile txnFile, Collection<Set<File>> oldFiles, Collection<Set<File>> newFiles) { Collection<Set<File>> temporary = txnFile.committed() ? oldFiles : newFiles; temporary.stream() .flatMap(Set::stream) .forEach((f) -> this.files.put(f, FileType.TEMPORARY)); } }
private void setTemporary(LogFile txnFile, Collection<Set<File>> oldFiles, Collection<Set<File>> newFiles) { Collection<Set<File>> temporary = txnFile.committed() ? oldFiles : newFiles; temporary.stream() .flatMap(Set::stream) .forEach((f) -> this.files.put(f, FileType.TEMPORARY)); } }
private void setTemporary(LogFile txnFile, Collection<Set<File>> oldFiles, Collection<Set<File>> newFiles) { Collection<Set<File>> temporary = txnFile.committed() ? oldFiles : newFiles; temporary.stream() .flatMap(Set::stream) .forEach((f) -> this.files.put(f, FileType.TEMPORARY)); } }
private void setTemporary(LogFile txnFile, Collection<Set<File>> oldFiles, Collection<Set<File>> newFiles) { Collection<Set<File>> temporary = txnFile.committed() ? oldFiles : newFiles; temporary.stream() .flatMap(Set::stream) .forEach((f) -> this.files.put(f, FileType.TEMPORARY)); } }
boolean completed() { return committed() || aborted(); }
boolean completed() { return committed() || aborted(); }
boolean completed() { return committed() || aborted(); }
boolean completed() { return committed() || aborted(); }
Throwable removeUnfinishedLeftovers(Throwable accumulate) { try { // we sync the parent directories before content deletion to ensure // any previously deleted files (see SSTableTider) are not // incorrectly picked up by record.getExistingFiles() in // deleteRecordFiles(), see CASSANDRA-12261 Throwables.maybeFail(syncDirectory(accumulate)); deleteFilesForRecordsOfType(committed() ? Type.REMOVE : Type.ADD); // we sync the parent directories between contents and log deletion // to ensure there is a happens before edge between them Throwables.maybeFail(syncDirectory(accumulate)); accumulate = replicas.delete(accumulate); } catch (Throwable t) { accumulate = merge(accumulate, t); } return accumulate; }
Throwable removeUnfinishedLeftovers(Throwable accumulate) { try { // we sync the parent directories before content deletion to ensure // any previously deleted files (see SSTableTider) are not // incorrectly picked up by record.getExistingFiles() in // deleteRecordFiles(), see CASSANDRA-12261 Throwables.maybeFail(syncDirectory(accumulate)); deleteFilesForRecordsOfType(committed() ? Type.REMOVE : Type.ADD); // we sync the parent directories between contents and log deletion // to ensure there is a happens before edge between them Throwables.maybeFail(syncDirectory(accumulate)); accumulate = replicas.delete(accumulate); } catch (Throwable t) { accumulate = merge(accumulate, t); } return accumulate; }
Throwable removeUnfinishedLeftovers(Throwable accumulate) { try { // we sync the parent directories before content deletion to ensure // any previously deleted files (see SSTableTider) are not // incorrectly picked up by record.getExistingFiles() in // deleteRecordFiles(), see CASSANDRA-12261 Throwables.maybeFail(syncDirectory(accumulate)); deleteFilesForRecordsOfType(committed() ? Type.REMOVE : Type.ADD); // we sync the parent directories between contents and log deletion // to ensure there is a happens before edge between them Throwables.maybeFail(syncDirectory(accumulate)); accumulate = replicas.delete(accumulate); } catch (Throwable t) { accumulate = merge(accumulate, t); } return accumulate; }
Throwable removeUnfinishedLeftovers(Throwable accumulate) { try { // we sync the parent directories before content deletion to ensure // any previously deleted files (see SSTableTider) are not // incorrectly picked up by record.getExistingFiles() in // deleteRecordFiles(), see CASSANDRA-12261 Throwables.maybeFail(syncDirectory(accumulate)); deleteFilesForRecordsOfType(committed() ? Type.REMOVE : Type.ADD); // we sync the parent directories between contents and log deletion // to ensure there is a happens before edge between them Throwables.maybeFail(syncDirectory(accumulate)); accumulate = replicas.delete(accumulate); } catch (Throwable t) { accumulate = merge(accumulate, t); } return accumulate; }