KAFKA-12369; Implement ListTransactions API#10206
Conversation
chia7712
left a comment
There was a problem hiding this comment.
LGTM overall, some questions are left. Please take a look.
| "about": "The transaction states to filter by: if empty, all transactions are returned; if non-empty, then only transactions matching one of the filtered states will be returned" | ||
| }, | ||
| { "name": "ProducerIdFilter", "type": "[]int64", "versions": "0+", | ||
| "about": "The producerIds to filter by: if empty, no transactions will be returned; if non-empty, only transactions which match one of the filtered producerIds will be returned" |
There was a problem hiding this comment.
no transactions will be returned
^^^^^^^^^^^^^^^^^^^^^^^^^^ this document is a bit weird since the code shows that all transactions are returned if this filter is empty.
There was a problem hiding this comment.
Yeah, my bad. On a side note, do you think it would be clearer if we used null to indicate the absence of the filter?
There was a problem hiding this comment.
On a side note, do you think it would be clearer if we used null to indicate the absence of the filter?
it should be fine in this case. However, the empty collection gets weird as it absolutely gets nothing :(
|
@chia7712 Thanks, I really appreciate your help reviewing these patches. I pushed a couple comments and left a few responses to your questions. |
|
@chia7712 I implemented your suggestion to include the unknown states in the response. Let me know how this looks to you. |
chia7712
left a comment
There was a problem hiding this comment.
@hachikuji Thanks for updating code. some comments are left. please take a look.
chia7712
left a comment
There was a problem hiding this comment.
+1 to this nice patch. Two trivial comments are left.
chia7712
left a comment
There was a problem hiding this comment.
+1 if following question is invalid
* apache-github/trunk: KAFKA-12400: Upgrade jetty to fix CVE-2020-27223 MINOR: Fix null exception in coordinator log (apache#10250) y KAFKA-12375: don't reuse thread.id until a thread has fully shut down (apache#10215) KAFKA-12177: apply log start offset retention before time and size based retention (apache#10216) KAFKA-12369; Implement `ListTransactions` API (apache#10206)
This patch implements the
ListTransactionsAPI as documented in KIP-664: https://cwiki.apache.org/confluence/display/KAFKA/KIP-664%3A+Provide+tooling+to+detect+and+abort+hanging+transactions. This is only the server-side implementation and does not contain theAdminAPI.Committer Checklist (excluded from commit message)