Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KAFKA-16265: KIP-994 (Part 1) Minor Enhancements to ListTransactionsRequest #15384

Merged
merged 16 commits into from
Feb 24, 2024

Conversation

yyu1993
Copy link
Contributor

@yyu1993 yyu1993 commented Feb 16, 2024

Introduces a new filter in ListTransactionsRequest API. This enables caller to filter on transactions that have been running for longer than a certain duration of time.

This PR includes the following changes:

  1. bumps version for ListTransactionsRequest API to 1. Set the durationFilter to -1L when communicating with an older broker that does not support version 1.
  2. bumps version for ListTransactionsResponse to 1 without changing the response structure.
  3. adds durationFilter option to kafka-transactions.sh --list

Tests:

  • Client side test to build request with correct combination of duration filter and API version: testBuildRequestWithDurationFilter
  • Server side test to filter transactions based on duration: testListTransactionsFiltering
  • Added test case for kafka-transactions.sh change in TransactionsCommandTest

Committer Checklist (excluded from commit message)

  • Verify design and implementation
  • Verify test coverage and CI build status
  • Verify documentation (including upgrade notes)

Copy link
Contributor

@jolshan jolshan left a comment

Choose a reason for hiding this comment

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

Thanks @yyu1993 I will wait for the tests to run and see if @RamanVerma has any comments.

Copy link
Contributor

@RamanVerma RamanVerma left a comment

Choose a reason for hiding this comment

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

thanks @yyu1993
I have left a few comments

@RamanVerma
Copy link
Contributor

I think the unit tests look good.

Is it possible to write/edit (in case we have one existing) an integration test that builds a request and validates the response from broker. You will need to feed in some transactions to the broker transactionManager cache as your test data.

Copy link
Contributor

@RamanVerma RamanVerma left a comment

Choose a reason for hiding this comment

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

thanks Yang Yu, LGTM

@jolshan
Copy link
Contributor

jolshan commented Feb 22, 2024

Something wrong with the build so I will restart.

@jolshan jolshan merged commit b4e9691 into apache:trunk Feb 24, 2024
1 check failed
wcarlson5 pushed a commit to wcarlson5/kafka that referenced this pull request Mar 28, 2024
…equest (apache#15384)

Introduces a new filter in ListTransactionsRequest API. This enables caller to filter on transactions that have been running for longer than a certain duration of time.

This PR includes the following changes:

bumps version for ListTransactionsRequest API to 1. Set the durationFilter to -1L when communicating with an older broker that does not support version 1.
bumps version for ListTransactionsResponse to 1 without changing the response structure.
adds durationFilter option to kafka-transactions.sh --list
Tests:

Client side test to build request with correct combination of duration filter and API version: testBuildRequestWithDurationFilter
Server side test to filter transactions based on duration: testListTransactionsFiltering
Added test case for kafka-transactions.sh change in TransactionsCommandTest

Reviewers: Justine Olshan <jolshan@confluent.io>, Raman Verma <rverma@confluent.io>
clolov pushed a commit to clolov/kafka that referenced this pull request Apr 5, 2024
…equest (apache#15384)

Introduces a new filter in ListTransactionsRequest API. This enables caller to filter on transactions that have been running for longer than a certain duration of time.

This PR includes the following changes:

bumps version for ListTransactionsRequest API to 1. Set the durationFilter to -1L when communicating with an older broker that does not support version 1.
bumps version for ListTransactionsResponse to 1 without changing the response structure.
adds durationFilter option to kafka-transactions.sh --list
Tests:

Client side test to build request with correct combination of duration filter and API version: testBuildRequestWithDurationFilter
Server side test to filter transactions based on duration: testListTransactionsFiltering
Added test case for kafka-transactions.sh change in TransactionsCommandTest

Reviewers: Justine Olshan <jolshan@confluent.io>, Raman Verma <rverma@confluent.io>
Phuc-Hong-Tran pushed a commit to Phuc-Hong-Tran/kafka that referenced this pull request Jun 6, 2024
…equest (apache#15384)

Introduces a new filter in ListTransactionsRequest API. This enables caller to filter on transactions that have been running for longer than a certain duration of time.

This PR includes the following changes:

bumps version for ListTransactionsRequest API to 1. Set the durationFilter to -1L when communicating with an older broker that does not support version 1.
bumps version for ListTransactionsResponse to 1 without changing the response structure.
adds durationFilter option to kafka-transactions.sh --list
Tests:

Client side test to build request with correct combination of duration filter and API version: testBuildRequestWithDurationFilter
Server side test to filter transactions based on duration: testListTransactionsFiltering
Added test case for kafka-transactions.sh change in TransactionsCommandTest

Reviewers: Justine Olshan <jolshan@confluent.io>, Raman Verma <rverma@confluent.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants