jolshan commented on code in PR #17687:
URL: https://github.com/apache/kafka/pull/17687#discussion_r1828582983
##########
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,
+ nextProducerId: Long = this.nextProducerId,
+ producerEpoch: Short = this.producerEpoch,
+ lastProducerEpoch: Short =
this.lastProducerEpoch,
+ txnTimeoutMs: Int = this.txnTimeoutMs,
+ topicPartitions:
immutable.Set[TopicPartition] = this.topicPartitions.toSet,
+ txnStartTimestamp: Long =
this.txnStartTimestamp,
+ txnLastUpdateTimestamp: Long =
this.txnLastUpdateTimestamp,
+ clientTransactionVersion: TransactionVersion
= this.clientTransactionVersion): TxnTransitMetadata = {
Review Comment:
Is the idea to keep clientTransactionVersion the same until each
PrepareCommit/PrepareAbortCall? Or will KIP-939 introduce changes to set this
in another transactional state.
--
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]