docs: protected <E extends RaftLogEntry> CompletableFuture<Indexed<E>> appendAndCompact(E entry, int attempt) {
      if (attempt == MAX_APPEND_ATTEMPTS) {
        return Futures.exceptionalFuture(new StorageException.OutOfDiskSpace("Not enough space to append entry"));
      } else {
        try {
          return CompletableFuture.completedFuture(raft.getLogWriter().append(entry))
              .thenApply(indexed -> {
                log.trace("Appended {}", indexed);
                return indexed;
              });
        } catch (StorageException.TooLarge e) {
          return Futures.exceptionalFuture(e);
        } catch (StorageException.OutOfDiskSpace e) {
          log.warn("Caught OutOfDiskSpace error! Force compacting logs...");
          return raft.getServiceManager().compact().thenCompose(v -> appendAndCompact(entry, attempt + 1));
        }
      }
    }