/** * Add the record to all the replicas: if it is a final record then we throw only if we fail to write it * to all, otherwise we throw if we fail to write it to any file, see CASSANDRA-10421 for details */ void append(LogRecord record) { Throwable err = Throwables.perform(null, replicas().stream().map(r -> () -> r.append(record))); if (err != null) { if (!record.isFinal() || err.getSuppressed().length == replicas().size() -1) Throwables.maybeFail(err); logger.error("Failed to add record '{}' to some replicas '{}'", record, this); } }
/** * Add the record to all the replicas: if it is a final record then we throw only if we fail to write it * to all, otherwise we throw if we fail to write it to any file, see CASSANDRA-10421 for details */ void append(LogRecord record) { Throwable err = Throwables.perform(null, replicas().stream().map(r -> () -> r.append(record))); if (err != null) { if (!record.isFinal() || err.getSuppressed().length == replicas().size() -1) Throwables.maybeFail(err); logger.error("Failed to add record '{}' to some replicas '{}'", record, this); } }
/** * Add the record to all the replicas: if it is a final record then we throw only if we fail to write it * to all, otherwise we throw if we fail to write it to any file, see CASSANDRA-10421 for details */ void append(LogRecord record) { Throwable err = Throwables.perform(null, replicas().stream().map(r -> () -> r.append(record))); if (err != null) { if (!record.isFinal() || err.getSuppressed().length == replicas().size() -1) Throwables.maybeFail(err); logger.error("Failed to add record '{}' to some replicas '{}'", record, this); } }
/** * Add the record to all the replicas: if it is a final record then we throw only if we fail to write it * to all, otherwise we throw if we fail to write it to any file, see CASSANDRA-10421 for details */ void append(LogRecord record) { Throwable err = Throwables.perform(null, replicas().stream().map(r -> () -> r.append(record))); if (err != null) { if (!record.isFinal() || err.getSuppressed().length == replicas().size() -1) Throwables.maybeFail(err); logger.error("Failed to add record '{}' to some replicas '{}'", record, this); } }