This repository was archived by the owner on Jan 24, 2024. It is now read-only.
[DON'T MERGE] Fix CreateTopics and DeleteTopics requests#598
Closed
BewareMyPower wants to merge 2 commits intobranch-2.7.2from
Closed
[DON'T MERGE] Fix CreateTopics and DeleteTopics requests#598BewareMyPower wants to merge 2 commits intobranch-2.7.2from
BewareMyPower wants to merge 2 commits intobranch-2.7.2from
Conversation
Fixes #591 Kafka Connect use `Admin#createTopics` and check the `TopicExistsException` exception for existed topics. See https://github.com/apache/kafka/blob/ef3cd68c852daf21d8e207fa8e21c8770f4041d7/connect/runtime/src/main/java/org/apache/kafka/connect/util/TopicAdmin.java#L394 for details. However, currently `Admin#createTopics` will return an `UnknownServerException` for any failure when create topics. In addition, the handler for CreateTopics request has other problems. 1. The default partition number (-1) is not handled, which may throw exception from `createPartitionedTopicAsync`. 2. If topic name is invalid, the future won't be completed until timeout. See #361, TimeoutException will be thrown in this case. 1. When the topic to create already exists, return a `TopicExistsException`. 2. Add a `tryComplete` method to complete a future of topic creation that may also complete the future of response. 3. Add related tests. ===== * Fix some bugs for create topic request * Fix KStreamAggregationTest * Catch KoPTopicException instead of RuntimeException
Collaborator
Author
|
OffsetFinderTest is broken. |
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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This PR tries to cherry-pick #348 and #592 to branch-2.7.2.