docs: public void resetState(RaftLog log) {
      snapshotIndex = 0;
      nextSnapshotIndex = 0;
      nextSnapshotOffset = 0;
      matchIndex = 0;
      heartbeatTime = 0;
      responseTime = 0;
      appending = 0;
      timeStats.clear();
      configuring = false;
      installing = false;
      appendSucceeded = false;
      failures = 0;
      failureTime = 0;
  
      switch (member.getType()) {
        case PASSIVE:
          reader = log.openReader(log.writer().getLastIndex() + 1, RaftLogReader.Mode.COMMITS);
          break;
        case PROMOTABLE:
        case ACTIVE:
          reader = log.openReader(log.writer().getLastIndex() + 1, RaftLogReader.Mode.ALL);
          break;
      }
    }