Skip to content

feat: support ListTransactions v0 and v1 - #3663

Merged
dnwe merged 2 commits into
mainfrom
dnwe/list-transactions
Jul 13, 2026
Merged

dnwe merged 2 commits into
mainfrom
dnwe/list-transactions

Conversation

@dnwe

@dnwe dnwe commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator

Add the ListTransactions API (key 66, KIP-664, Kafka 3.0.0) and its v1 duration filter (KIP-994, Kafka 3.8.0):

  • add ListTransactionsRequest/Response with flexible v0 encoding
  • add v1 DurationFilter, defaulted to -1 (no filter) on v0 decode
  • add TransactionState constants for use in StateFilters
  • add Broker.ListTransactions helper
  • add unit test fixtures and a functional test against the transaction coordinator

KIP-664: https://cwiki.apache.org/confluence/display/KAFKA/KIP-664%3A+Provide+tooling+to+detect+and+abort+hanging+transactions
KIP-994: https://cwiki.apache.org/confluence/display/KAFKA/KIP-994%3A+Minor+Enhancements+to+ListTransactions+and+DescribeTransactions+APIs

Contributes-to: #3655

dnwe added 2 commits July 13, 2026 16:26
- add compact putInt64Array to the flexible encoders
- add getInt64Array/getNullableInt64Array to the flexible decoder
- slim the duplicated int32 array decoder test tables

Signed-off-by: Dominic Evans <dominic.evans@uk.ibm.com>
Add the ListTransactions API (key 66, KIP-664, Kafka 3.0.0) and its v1
duration filter (KIP-994, Kafka 3.8.0):

- add ListTransactionsRequest/Response with flexible v0 encoding
- add v1 DurationFilter, defaulted to -1 (no filter) on v0 decode
- add TransactionState constants for use in StateFilters
- add Broker.ListTransactions helper
- add unit test fixtures and a functional test against the
  transaction coordinator

KIP-664: https://cwiki.apache.org/confluence/display/KAFKA/KIP-664%3A+Provide+tooling+to+detect+and+abort+hanging+transactions
KIP-994: https://cwiki.apache.org/confluence/display/KAFKA/KIP-994%3A+Minor+Enhancements+to+ListTransactions+and+DescribeTransactions+APIs

Signed-off-by: Dominic Evans <dominic.evans@uk.ibm.com>
@dnwe dnwe added the feat label Jul 13, 2026
Base automatically changed from dnwe/flexible-int64 to main July 13, 2026 15:12

@hindessm hindessm left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. (Though the real_decoder_test.go diff was horrific.)

@dnwe

dnwe commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator Author

Yeah patience diff worked better than the ui - thanks for reviewing

@dnwe
dnwe merged commit ba6e7ba into main Jul 13, 2026
19 checks passed
@dnwe
dnwe deleted the dnwe/list-transactions branch July 13, 2026 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants