sjhajharia commented on code in PR #15486:
URL: https://github.com/apache/kafka/pull/15486#discussion_r1519327877


##########
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:
   agreed. thanks for the suggestion
   I will update the code here



-- 
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: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to