public void onLogStartOffsetIncremented(long logStartOffset) {
        removeUnreplicatedTransactions(logStartOffset);

        if (lastMapOffset < logStartOffset) lastMapOffset = logStartOffset;

        lastSnapOffset = latestSnapshotOffset().orElse(logStartOffset);
    }
Remove any unreplicated transactions lower than the provided logStartOffset and bring the lastMapOffset forward
if necessary.
storage/src/main/java/org/apache/kafka/storage/internals/log/ProducerStateManager.java