Issue 1067: Problems with Partitioned Topics which name contains -partition-N#2342
Merged
sijie merged 4 commits intoapache:masterfrom Aug 11, 2018
Merged
Issue 1067: Problems with Partitioned Topics which name contains -partition-N#2342sijie merged 4 commits intoapache:masterfrom
sijie merged 4 commits intoapache:masterfrom
Conversation
…tition-N ### Motivation Fixes apache#1067. Someone accidentally created a partitioned topic in one of our cluster with a name which contains -partition-2. This raised all sorts of issues, it would seem that only one partition was created for this topic, but metadata exists saying that it has 10 partitions. ### Changes Disallow creating a partitioned topic contains '-partition-' in the name.
srkukarni
approved these changes
Aug 8, 2018
Contributor
|
rerun java8 tests |
1 similar comment
Member
Author
|
rerun java8 tests |
jiazhai
approved these changes
Aug 9, 2018
rdhabalia
reviewed
Aug 10, 2018
| // first, it has to be a validate topic name | ||
| validateTopicName(tenant, namespace, encodedTopic); | ||
| // second, "-partition-" is not allowed | ||
| if (encodedTopic.contains("-partition-")) { |
Contributor
There was a problem hiding this comment.
can we use TopicName.PARTITIONED_TOPIC_SUFFIX instead a plain string?
Member
Author
There was a problem hiding this comment.
changed it to use the constant
rdhabalia
approved these changes
Aug 10, 2018
sijie
added a commit
that referenced
this pull request
Aug 27, 2018
…tition-N (#2342) * Issue 1067: Problems with Partitioned Topics which name contains -partition-N ### Motivation Fixes #1067. Someone accidentally created a partitioned topic in one of our cluster with a name which contains -partition-2. This raised all sorts of issues, it would seem that only one partition was created for this topic, but metadata exists saying that it has 10 partitions. ### Changes Disallow creating a partitioned topic contains '-partition-' in the name. * only validate partitioned topic name when create/delete/update partitioned topics * Changed to use a CONSTANT
Member
Author
|
merged as |
5 tasks
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Motivation
Fixes #1067.
Someone accidentally created a partitioned topic in one of our cluster with a name which contains -partition-2.
This raised all sorts of issues, it would seem that only one partition was created for this topic, but metadata exists saying that it has 10 partitions.
Changes
Disallow creating a partitioned topic contains '-partition-' in the name.