@Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        LastRecord that = (LastRecord) o;

        return producerEpoch == that.producerEpoch &&
                lastDataOffset.equals(that.lastDataOffset);
    }
The last written record for a given producer. The last data offset may be undefined
if the only log entry for a producer is a transaction marker.
storage/src/main/java/org/apache/kafka/storage/internals/log/LastRecord.java