You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "artemlivshits (via GitHub)" <gi...@apache.org> on 2023/04/03 21:51:47 UTC

[GitHub] [kafka] artemlivshits commented on a diff in pull request #13463: KAFKA-14854: Refactor inter broker send thread to handle all interbroker requests on one thread

artemlivshits commented on code in PR #13463:
URL: https://github.com/apache/kafka/pull/13463#discussion_r1156488622


##########
core/src/main/scala/kafka/coordinator/transaction/TransactionCoordinator.scala:
##########
@@ -59,8 +61,9 @@ object TransactionCoordinator {
       time, metrics)
 
     val logContext = new LogContext(s"[TransactionCoordinator id=${config.brokerId}] ")
-    val txnMarkerChannelManager = TransactionMarkerChannelManager(config, metrics, metadataCache, txnStateManager,
-      time, logContext)
+    val txnMarkerChannelManager = new TransactionMarkerChannelManager(config, metadataCache, txnStateManager,
+      time)
+    interBrokerSender.addRequestManager(txnMarkerChannelManager)

Review Comment:
   Just to clarify -- prior to my suggestion the code both passed the sender as a constructor argument and also required adding the request, so I suggested to eliminate one of those, happened to be the constructor argument.  The other way around (just have a constructor argument, and eliminate adding request) sounds good to me as well, it's just doing both seems redundant.



-- 
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-unsubscribe@kafka.apache.org

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