docs: private CompletableFuture<Void> requestBootstrapFromPeers(List<MemberId> peers) {
      if (peers.isEmpty()) {
        return CompletableFuture.completedFuture(null);
      }
      CompletableFuture<Void> future = new CompletableFuture<>();
      final int totalPeers = peers.size();
      AtomicBoolean successful = new AtomicBoolean();
      AtomicInteger totalCount = new AtomicInteger();
      AtomicReference<Throwable> lastError = new AtomicReference<>();
  
      // Iterate through all of the peers and send a bootstrap request. On the first peer that returns
      // a successful bootstrap response, complete the future. Otherwise, if no peers respond with any
      // successful bootstrap response, the future will be completed with the last exception.
      for (MemberId peer : peers) {
        requestBootstrapFromPeer(peer).whenComplete((result, error) -> {
          if (error == null) {
            if (successful.compareAndSet(false, true)) {
              future.complete(null);
            } else if (totalCount.incrementAndGet() == totalPeers) {
              Throwable e = lastError.get();
              if (e != null) {
                future.completeExceptionally(e);
              }
            }
          } else {
            if (!successful.get() && totalCount.incrementAndGet() == totalPeers) {
              future.completeExceptionally(error);
            } else {
              lastError.set(error);
            }
          }
        });
      }
      return future;
    }