jolshan commented on code in PR #15486:
URL: https://github.com/apache/kafka/pull/15486#discussion_r1518064096
##########
core/src/main/scala/kafka/server/AddPartitionsToTxnManager.scala:
##########
@@ -228,11 +232,17 @@ class AddPartitionsToTxnManager(
val tp = new TopicPartition(topicResult.name,
partitionResult.partitionIndex)
if (partitionResult.partitionErrorCode != Errors.NONE.code) {
// Producers expect to handle INVALID_PRODUCER_EPOCH in this
scenario.
- val code =
+ var code =
if (partitionResult.partitionErrorCode ==
Errors.PRODUCER_FENCED.code)
Errors.INVALID_PRODUCER_EPOCH.code
else
partitionResult.partitionErrorCode
+ // For backward compatibility with clients.
Review Comment:
nice 👍
I think we can include this in val code as a subcase so we don't need the
var
--
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]