hachikuji commented on code in PR #13787:
URL: https://github.com/apache/kafka/pull/13787#discussion_r1258915597


##########
core/src/main/scala/kafka/cluster/Partition.scala:
##########
@@ -578,7 +578,7 @@ class Partition(val topicPartition: TopicPartition,
 
   // Returns a verification guard object if we need to verify. This starts or 
continues the verification process. Otherwise return null.
   def maybeStartTransactionVerification(producerId: Long): Object = {
-    leaderLogIfLocal match {
+    log match {

Review Comment:
   Returning an error seems straightforward. No harm done if the broker comes 
leader just after since the client will retry. Given how hard the scenario was 
to reproduce, I'm not too concerned about impact from retries.



##########
core/src/main/scala/kafka/cluster/Partition.scala:
##########
@@ -578,7 +578,7 @@ class Partition(val topicPartition: TopicPartition,
 
   // Returns a verification guard object if we need to verify. This starts or 
continues the verification process. Otherwise return null.
   def maybeStartTransactionVerification(producerId: Long): Object = {
-    leaderLogIfLocal match {
+    log match {

Review Comment:
   Returning an error seems straightforward. No harm done if the broker becomes 
leader just after since the client will retry. Given how hard the scenario was 
to reproduce, I'm not too concerned about impact from retries.



-- 
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