private long nextSequentialOffset() {
        return lastOffset == null ? baseOffset : lastOffset + 1;
    }
Get an estimate of the number of bytes written to the underlying buffer. The returned value
is exactly correct if the record set is not compressed or if the builder has been closed.
clients/src/main/java/org/apache/kafka/common/record/MemoryRecordsBuilder.java