public long appendTimestamp() {
            // 1. firstBatch is not null because data has one and only one batch
            // 2. maxTimestamp is the append time of the batch. This needs to be changed
            //    to return the LastContainedLogTimestamp of the SnapshotHeaderRecord
            return data.firstBatch().maxTimestamp();
        }
Get the number of completed batches which are ready to be drained.
This does not include the batch that is currently being filled.
raft/src/main/java/org/apache/kafka/raft/internals/BatchAccumulator.java