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

KAFKA-5232 Fix Log.parseTopicPartitionName to take into account dot character in topic names of deleted topics #3043

Closed
wants to merge 1 commit into from

Conversation

jaikiran
Copy link
Member

The commit here contains a fix and testcase for the issue reported in https://issues.apache.org/jira/browse/KAFKA-5232, where if a topic marked for deletion, has a . character in its name then the Kafka broker fails to start and keeps shutting down

@jaikiran
Copy link
Member Author

By the way, this issue also affects trunk. I don't remember what the process is for PR submission - is a separate PR against trunk needed?

@ijuma
Copy link
Contributor

ijuma commented May 13, 2017

Thanks for the PR. Yes, we generally submit PRs for trunk and cherry-pick if it applies cleanly. Otherwise, separate PRs are needed.

@asfbot
Copy link

asfbot commented May 13, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/kafka-pr-jdk7-scala2.10/3750/
Test PASSed (JDK 7 and Scala 2.10).

@asfbot
Copy link

asfbot commented May 13, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/kafka-pr-jdk7-scala2.11/3867/
Test PASSed (JDK 7 and Scala 2.11).

@asfbot
Copy link

asfbot commented May 13, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/kafka-pr-jdk8-scala2.12/3856/
Test PASSed (JDK 8 and Scala 2.12).

@rnpridgeon
Copy link
Contributor

edit: I was wrong regex checks out so I removed my comment

else dirName

if (!name.contains('-')) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I trunk we also have if (dirName.endsWith(DeleteDirSuffix) && !dirName.matches("^(\\S+)-(\\S+)\\.(\\S+)" + DeleteDirSuffix)). We need to double-check if this check is still needed given that.

Copy link
Member Author

Choose a reason for hiding this comment

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

@ijuma, I had a look at the code in trunk and as you note, this additional check won't be necessary there. I will raise a separate PR for trunk which won't include this additional check.

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks. Maybe we should cherry-pick the commit that added that check in trunk to 0.10.2 as well.

Copy link
Member Author

Choose a reason for hiding this comment

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

Good point. That commit which brought in that regex check, in trunk, was self contained. So I have cherry-picked it and included it in this PR.

@asfbot
Copy link

asfbot commented May 14, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/kafka-pr-jdk7-scala2.11/3892/
Test PASSed (JDK 7 and Scala 2.11).

@asfbot
Copy link

asfbot commented May 14, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/kafka-pr-jdk8-scala2.12/3881/
Test PASSed (JDK 8 and Scala 2.12).

@asfbot
Copy link

asfbot commented May 14, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/kafka-pr-jdk7-scala2.10/3751/
Test PASSed (JDK 7 and Scala 2.10).

@ijuma
Copy link
Contributor

ijuma commented May 15, 2017

@jaikiran I merged the trunk PR and cherry-picked e2d4198 to 0.10.2 (it merged cleanly). Can you please rebase this PR against 0.10.2 and add the changes we added to the trunk PR during review?

…aking into account the potential presence of '.' character in topic names while looking for topics that are marked for deletion
@jaikiran
Copy link
Member Author

@ijuma, done. PR has been updated. Given the nature of changes, please review once more, before merging.

Copy link
Contributor

@ijuma ijuma left a comment

Choose a reason for hiding this comment

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

LGTM, will merge after the tests pass.

@asfbot
Copy link

asfbot commented May 15, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/kafka-pr-jdk8-scala2.12/3902/
Test FAILed (JDK 8 and Scala 2.12).

@asfbot
Copy link

asfbot commented May 15, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/kafka-pr-jdk7-scala2.11/3913/
Test PASSed (JDK 7 and Scala 2.11).

asfgit pushed a commit that referenced this pull request May 15, 2017
…with a period in the name

This issue would only be triggered if a broker was restarted while
deletion was still taking place.

Included a few minor improvements to that method and its tests.

A separate PR was submitted for 0.10.2 as the trunk change did
not merge cleanly.

Author: Jaikiran Pai <jaikiran.pai@gmail.com>

Reviewers: Ryan Pridgeon <ryan.n.pridgeon@gmail.com>, Ismael Juma <ismael@juma.me.uk>

Closes #3043 from jaikiran/KAFKA-5232
@asfbot
Copy link

asfbot commented May 15, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/kafka-pr-jdk7-scala2.10/3752/
Test FAILed (JDK 7 and Scala 2.10).

@ijuma
Copy link
Contributor

ijuma commented May 17, 2017

@jaikiran, can you please close this PR since it's been merged?

@jaikiran
Copy link
Member Author

Closing.

@jaikiran jaikiran closed this May 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants