mumrah commented on a change in pull request #10009:
URL: https://github.com/apache/kafka/pull/10009#discussion_r568133942



##########
File path: 
core/src/main/scala/kafka/coordinator/transaction/TransactionCoordinator.scala
##########
@@ -615,7 +615,7 @@ class TransactionCoordinator(brokerId: Int,
     info("Shutting down.")
     isActive.set(false)
     scheduler.shutdown()
-    producerIdManager.shutdown()
+    producerIdGenerator.shutdown()

Review comment:
       Since we're externalizing this trait (`ProducerIdGenerator`), it seems 
odd that TransactionCoordinator takes it as a dependency, but then later 
assumes the responsibility of closing it. I think we might need to move the 
shutdown call to the same place we create the instance, just so the ownership 
is clear.
   
   Alternatively (and maybe preferably?) we can keep the ProducerIdGenerator 
construction in the companion object and add a second `apply` method when we 
add the KIP-500 implementation.




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

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


Reply via email to