jolshan commented on code in PR #17687:
URL: https://github.com/apache/kafka/pull/17687#discussion_r1828546672
##########
core/src/main/scala/kafka/coordinator/transaction/TransactionMetadata.scala:
##########
@@ -380,50 +417,39 @@ private[transaction] class TransactionMetadata(val
transactionalId: String,
}
}
- private def prepareTransitionTo(updatedState: TransactionState,
- updatedProducerId: Long,
- updatedEpoch: Short,
- updatedLastEpoch: Short,
- updatedTxnTimeoutMs: Int,
- updatedTopicPartitions:
immutable.Set[TopicPartition],
- updatedTxnStartTimestamp: Long,
- updateTimestamp: Long): TxnTransitMetadata =
{
- prepareTransitionTo(updatedState, updatedProducerId,
RecordBatch.NO_PRODUCER_ID, updatedEpoch, updatedLastEpoch,
updatedTxnTimeoutMs, updatedTopicPartitions, updatedTxnStartTimestamp,
updateTimestamp, TransactionVersion.TV_0)
- }
-
- private def prepareTransitionTo(updatedState: TransactionState,
- updatedProducerId: Long,
- nextProducerId: Long,
- updatedEpoch: Short,
- updatedLastEpoch: Short,
- updatedTxnTimeoutMs: Int,
- updatedTopicPartitions:
immutable.Set[TopicPartition],
- updatedTxnStartTimestamp: Long,
- updateTimestamp: Long,
- clientTransactionVersion:
TransactionVersion): TxnTransitMetadata = {
+ private def prepareTransitionTo(state: TransactionState,
+ producerId: Long = this.producerId,
Review Comment:
There was a previous effort to remove default arguments in order to not
accidentally set something incorrect. I think the defaults make sense (keeping
the same) so I think it makes sense, but wanted to mention this change.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]