synchronized long tryAppend(
            int nodeId,
            int epoch,
            OptionalLong requiredBaseOffset,
            LocalBatch batch
        ) {
            if (!leader.isLeader(nodeId)) {
                log.debug("tryAppend(nodeId={}, epoch={}): the given node id does not " +
                        "match the current leader id of {}.", nodeId, epoch, leader.leaderId());
                throw new NotLeaderException("Append failed because the replication is not the current leader");
            }

            if (epoch < leader.epoch()) {
                throw new NotLeaderException("Append failed because the given epoch " + epoch + " is stale. " +
                        "Current leader epoch = " + leader.epoch());
            } else if (epoch > leader.epoch()) {
                throw new IllegalArgumentException("Attempt to append from epoch " + epoch +
                        " which is larger than the current epoch " + leader.epoch());
            }

            log.trace("tryAppend(nodeId={}): appending {}.", nodeId, batch);
            long offset = append(requiredBaseOffset, batch);
            electLeaderIfNeeded();
            return offset;
        }
The initial max read offset which LocalLog instances will be configured with.
metadata/src/test/java/org/apache/kafka/metalog/LocalLogManager.java