-
Notifications
You must be signed in to change notification settings - Fork 14.2k
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
base: trunk
Are you sure you want to change the base?
MINOR: update truncation test #18952
Conversation
@@ -112,7 +117,10 @@ def none_consumed(this, consumer): | |||
|
|||
pre_truncation_pos = consumer.current_position(tp) | |||
|
|||
self.kafka.set_unclean_leader_election(self.TOPIC) |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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"?
There was a problem hiding this comment.
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.
testBalancePartitionLeaders can pass in local. Can we rerun the tests? |
@CalvinConfluent Still one question left to answer. |
Reduce the minISR to be 1 for the truncation test in order to skip the protection from KIP-966