code: protected void handleAppendResponseOk(MemberState member, AppendRequest request, AppendResponse response) {
      // Reset the member failure count and update the member's availability status if necessary.
      succeedAttempt(member);
  
      // If replication succeeded then trigger commit futures.
      if (response.succeeded()) {
        member.appendSucceeded();
        updateMatchIndex(member, response);
  
        // If entries were committed to the replica then check commit indexes.
        if (!request.entries().isEmpty()) {
          commitEntries();
        }
  
        // If there are more entries to send then attempt to send another commit.
        if (hasMoreEntries(member)) {
          appendEntries(member);
        }
      }
      // If we've received a greater term, update the term and transition back to follower.
      else if (response.term() > context.getTerm()) {
        context.setTerm(response.term()).setLeader(0);
        context.transition(CopycatServer.State.FOLLOWER);
      }
      // If the response failed, the follower should have provided the correct last index in their log. This helps
      // us converge on the matchIndex faster than by simply decrementing nextIndex one index at a time.
      else {
        member.appendFailed();
        resetMatchIndex(member, response);
        resetNextIndex(member);
  
        // If there are more entries to send then attempt to send another commit.
        if (hasMoreEntries(member)) {
          appendEntries(member);
        }
      }
    }
docs: Handles a {@link Response.Status#OK} response.