chia7712 commented on a change in pull request #10206:
URL: https://github.com/apache/kafka/pull/10206#discussion_r582583372



##########
File path: 
core/src/main/scala/kafka/coordinator/transaction/TransactionStateManager.scala
##########
@@ -223,6 +224,46 @@ class TransactionStateManager(brokerId: Int,
       throw new IllegalStateException(s"Unexpected empty transaction metadata 
returned while putting $txnMetadata")))
   }
 
+  def listTransactionStates(
+    filterProducerIds: Set[Long],
+    filterStateNames: Set[String]
+  ): Either[Errors, List[ListTransactionsResponseData.TransactionState]] = {
+    inReadLock(stateLock) {
+      if (loadingPartitions.nonEmpty) {
+        Left(Errors.COORDINATOR_LOAD_IN_PROGRESS)
+      } else {
+        val filterStates = filterStateNames.flatMap(TransactionState.fromName)

Review comment:
       Probably the response should have a field showing the invalid filters. 
The callers would know which filters are NOT working.




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