chia7712 commented on code in PR #21735:
URL: https://github.com/apache/kafka/pull/21735#discussion_r4652322662
##########
core/src/main/scala/kafka/coordinator/transaction/TransactionCoordinator.scala:
##########
@@ -140,9 +141,12 @@ class TransactionCoordinator(txnConfig: TransactionConfig,
// 2PC functionality is disabled, clients that attempt to use this
functionality
// would receive an authorization failed error.
responseCallback(initTransactionError(Errors.TRANSACTIONAL_ID_AUTHORIZATION_FAILED))
- } else if (keepPreparedTxn) {
- // if the request is to keep the prepared transaction, then return an
- // unsupported version error since the feature hasn't been implemented
yet.
+ } else if (keepPreparedTxn && expectedProducerIdAndEpoch.nonEmpty) {
+ // keepPreparedTxn can only be specified in the initial call of
InitProducerId, so
+ // no expected producerId / epoch should be set
+ responseCallback(initTransactionError(Errors.INVALID_REQUEST))
+ } else if (keepPreparedTxn &&
!txnManager.transactionVersionLevel().supportsEpochBump()) {
Review Comment:
Out of curiosity, KIP-1313 is going to bump the request version as well, and
its target is 4.5.0. Hence, InitProducerIdRequest v6 will become stable in
4.5.0. So I guess either KIP-939 gets completed in 4.5.0 too, or TV3 will be
introduced as a new gate?
--
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]