public long lastStableOffset(CompletedTxn completedTxn) {
        return findNextIncompleteTxn(completedTxn.producerId)
                .map(x -> x.firstOffset.messageOffset)
                .orElse(completedTxn.lastOffset + 1);
    }
Compute the last stable offset of a completed transaction, but do not yet mark the transaction complete.
That will be done in `completeTxn` below. This is used to compute the LSO that will be appended to the
transaction index, but the completion must be done only after successfully appending to the index.
storage/src/main/java/org/apache/kafka/storage/internals/log/ProducerStateManager.java