code: private void appendInitialEntries() {
      final long term = context.getTerm();
  
      // Append a no-op entry to reset session timeouts and commit entries from prior terms.
      try (InitializeEntry entry = context.getLog().create(InitializeEntry.class)) {
        entry.setTerm(term)
          .setTimestamp(appender.time());
        Assert.state(context.getLog().append(entry) == appender.index(), "Initialize entry not appended at the start of the leader's term");
        LOGGER.trace("{} - Appended {}", context.getCluster().member().address(), entry);
      }
  
      // Append a configuration entry to propagate the leader's cluster configuration.
      configure(context.getCluster().members());
    }
docs: Appends initial entries to the log to take leadership.