docs: public CompletableFuture<Long> appendEntries(long index) {
      raft.checkThread();
  
      if (index == 0) {
        return appendEntries();
      }
  
      if (index <= raft.getCommitIndex()) {
        return CompletableFuture.completedFuture(index);
      }
  
      // If there are no other stateful servers in the cluster, immediately commit the index.
      if (raft.getCluster().getActiveMemberStates().isEmpty() && raft.getCluster().getPassiveMemberStates().isEmpty()) {
        long previousCommitIndex = raft.getCommitIndex();
        raft.setCommitIndex(index);
        completeCommits(previousCommitIndex, index);
        return CompletableFuture.completedFuture(index);
      }
      // If there are no other active members in the cluster, update the commit index and complete the commit.
      // The updated commit index will be sent to passive/reserve members on heartbeats.
      else if (raft.getCluster().getActiveMemberStates().isEmpty()) {
        long previousCommitIndex = raft.getCommitIndex();
        raft.setCommitIndex(index);
        completeCommits(previousCommitIndex, index);
        return CompletableFuture.completedFuture(index);
      }
  
      // Only send entry-specific AppendRequests to active members of the cluster.
      return appendFutures.computeIfAbsent(index, i -> {
        for (RaftMemberContext member : raft.getCluster().getActiveMemberStates()) {
          appendEntries(member);
        }
        return new CompletableFuture<>();
      });
    }