private Optional<TxnMetadata> findNextIncompleteTxn(long producerId) {
        for (TxnMetadata txnMetadata : ongoingTxns.values()) {
            if (txnMetadata.producerId != producerId) {
                return Optional.of(txnMetadata);
            }
        }
        return Optional.empty();
    }
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