-
Notifications
You must be signed in to change notification settings - Fork 15.4k
MINOR: System tests for Raft-based metadata quorums #10105
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
Merged
Merged
Changes from all commits
Commits
Show all changes
38 commits
Select commit
Hold shift + click to select a range
6bd384c
KAFKA-12276: Add the KIP-500 controller code
cmccabe a8a2277
MINOR: Add KIP-500 Broker
rondagostino f7958ec
Remove unused imports
rondagostino 1d914b8
Add test_bounce.py system test
rondagostino 805e1be
Fix NPE due to creating AutoTopicCreateMgr before Grp/Txn Coordinators
rondagostino 294d410
Workaround Raft issue
rondagostino 702720b
Instantiate QuorumController instance
rondagostino 8f6e443
KAFKA-12276: Add the KIP-500 controller code
cmccabe b902eb8
Merge commit '8f6e443e02174cfcc4eb29dd383269f09ccfc3b7' into kip500_f…
rondagostino 11a000b
Set QuorumController metrics
rondagostino 31ade2d
Replace configuredLogContext param with controllerSocketServer: Boolean
rondagostino 7f6d9cc
Merge remote-tracking branch 'apache/trunk' into kip500_full
rondagostino 507ca6c
KAFKA-12276: Add the KIP-500 controller code
cmccabe e8ecbcf
Fix Raft broker restart issue when offset partitions are deferred
rondagostino 48d2b15
System test Raft-based clusters: sanity_checks and tests/client
rondagostino 0d1e467
Merge remote-tracking branch 'apache/trunk' into kip500_full
rondagostino 8285cc7
Fix typo causing tests to not run
rondagostino 7c8a20e
Add KIP-500 system tests to tests/core plus connect/streams smoke tests
rondagostino 293841b
KAFKA-12276: Add the KIP-500 controller code
cmccabe d2a7807
Address review comments
cmccabe 807b7cc
Address review comments
cmccabe 4356954
Some partition management improvements
cmccabe ff2eef6
Shut down the broker metadata listener during controlled shutdown
cmccabe 87148a9
fix leader election
cmccabe 0b2116e
Merge commit '293841b05d881a83c7e80631a20bcac939534681' into kip500_full
rondagostino 79ed897
Merge commit 'd2a78075b71197c634f83188b4d6b07912d269bd' into kip500_full
rondagostino 29ed796
Merge commit '807b7cc2393eb5c1a291854bd7cb3e2df2f9d1dd' into kip500_full
rondagostino 2eb94d2
Merge commit '435695488f48c49babfa7f297a9123bd1c4a69ae' into kip500_full
rondagostino 8346feb
Merge commit 'ff2eef63ed1d78398da8ca456b978180e86bf23f' into kip500_full
rondagostino 9874a20
Merge commit '87148a92ab4d736e02dbc7382c2d19a669d7ae8e' into kip500_full
rondagostino 81efd48
Add missing @cluster annotations
rondagostino 98535c7
Add missing import
rondagostino a0fc0e6
Merge remote-tracking branch 'apache/trunk' into kip500_full
rondagostino f59453f
Revert workaround now that KAFKA-12331 is merged
rondagostino 44c9063
Set both broker_list and zk_connect for old consumer
rondagostino b9e5693
Add version.supports_bootstrap_server()
rondagostino 5026fd3
minor client compatibility test fixups
rondagostino 0e86461
Rename version.supports_bootstrap_server => consumer_supports_bootstr…
rondagostino File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,72 @@ | ||
| # Licensed to the Apache Software Foundation (ASF) under one or more | ||
| # contributor license agreements. See the NOTICE file distributed with | ||
| # this work for additional information regarding copyright ownership. | ||
| # The ASF licenses this file to You under the Apache License, Version 2.0 | ||
| # (the "License"); you may not use this file except in compliance with | ||
| # the License. You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
|
|
||
| from ducktape.mark import parametrize | ||
| from ducktape.mark.resource import cluster | ||
| from ducktape.tests.test import Test | ||
| from ducktape.utils.util import wait_until | ||
|
|
||
| from kafkatest.services.kafka import KafkaService, quorum | ||
| from kafkatest.services.verifiable_producer import VerifiableProducer | ||
| from kafkatest.services.zookeeper import ZookeeperService | ||
|
|
||
|
|
||
| class TestBounce(Test): | ||
| """Sanity checks on verifiable producer service class with cluster roll.""" | ||
| def __init__(self, test_context): | ||
| super(TestBounce, self).__init__(test_context) | ||
|
|
||
| self.topic = "topic" | ||
| self.zk = ZookeeperService(test_context, num_nodes=1) if quorum.for_test(test_context) == quorum.zk else None | ||
| self.kafka = KafkaService(test_context, num_nodes=1, zk=self.zk, | ||
| topics={self.topic: {"partitions": 1, "replication-factor": 1}}, | ||
| controller_num_nodes_override=3 if quorum.for_test(test_context) == quorum.remote_raft else 1) | ||
| self.num_messages = 1000 | ||
|
|
||
| def create_producer(self): | ||
| # This will produce to source kafka cluster | ||
| self.producer = VerifiableProducer(self.test_context, num_nodes=1, kafka=self.kafka, topic=self.topic, | ||
| max_messages=self.num_messages, throughput=self.num_messages // 10) | ||
| def setUp(self): | ||
| if self.zk: | ||
| self.zk.start() | ||
|
|
||
| @cluster(num_nodes=6) | ||
| @parametrize(metadata_quorum=quorum.remote_raft) | ||
| @cluster(num_nodes=4) | ||
| @parametrize(metadata_quorum=quorum.colocated_raft) | ||
| @cluster(num_nodes=4) | ||
| @parametrize(metadata_quorum=quorum.zk) | ||
| def test_simple_run(self, metadata_quorum): | ||
| """ | ||
| Test that we can start VerifiableProducer on the current branch snapshot version, and | ||
| verify that we can produce a small number of messages both before and after a subsequent roll. | ||
| """ | ||
| self.kafka.start() | ||
| for first_time in [True, False]: | ||
| self.create_producer() | ||
| self.producer.start() | ||
| wait_until(lambda: self.producer.num_acked > 5, timeout_sec=15, | ||
| err_msg="Producer failed to start in a reasonable amount of time.") | ||
|
|
||
| self.producer.wait() | ||
| num_produced = self.producer.num_acked | ||
| assert num_produced == self.num_messages, "num_produced: %d, num_messages: %d" % (num_produced, self.num_messages) | ||
| if first_time: | ||
| self.producer.stop() | ||
| if self.kafka.quorum_info.using_raft and self.kafka.remote_controller_quorum: | ||
| self.kafka.remote_controller_quorum.restart_cluster() | ||
| self.kafka.restart_cluster() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.