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

MINOR: update truncation test #18952

Open
wants to merge 3 commits into
base: trunk
Choose a base branch
from

Conversation

CalvinConfluent
Copy link
Contributor

@CalvinConfluent CalvinConfluent commented Feb 18, 2025

Reduce the minISR to be 1 for the truncation test in order to skip the protection from KIP-966

@github-actions github-actions bot added triage PRs from the community tests Test fixes (including flaky tests) small Small PRs labels Feb 18, 2025
@dajac dajac changed the title Minor: update truncation test MINOR: update truncation test Feb 18, 2025
@dajac dajac removed the triage PRs from the community label Feb 18, 2025
@@ -112,7 +117,10 @@ def none_consumed(this, consumer):

pre_truncation_pos = consumer.current_position(tp)

self.kafka.set_unclean_leader_election(self.TOPIC)
Copy link
Member

Choose a reason for hiding this comment

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

For my understanding, why can't we use this one any more?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

set_unclean_leader_election sets the unclean.leader.election.enable config to true. It is the same if we set this config when creating the topic.
Creating the topic with the config so that the unclean election can trigger by this event. In the old way, election happens here which is no longer possible if use wait_until to wait for the unclean leader election.

Copy link
Contributor

Choose a reason for hiding this comment

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

Is the idea that it's simpler to create the topic with this configuration than set it later? If so then the answer is "we could still use this, but we don't want to"?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, it is simpler. The unclean.leader.election.enable has to be set before an event that triggers the election. Because I enforce the event sequence in this PR, it is too late to set the config in its original place. So we need to set the config earlier. The option I choose is to set it during the topic creation.

@CalvinConfluent
Copy link
Contributor Author

CalvinConfluent commented Feb 20, 2025

testBalancePartitionLeaders can pass in local. Can we rerun the tests?

@CalvinConfluent
Copy link
Contributor Author

@dajac @cmccabe Can you help take a look?

@cmccabe
Copy link
Contributor

cmccabe commented Feb 21, 2025

@CalvinConfluent Still one question left to answer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci-approved small Small PRs tests Test fixes (including flaky tests)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants