You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Jørgen (Jira)" <ji...@apache.org> on 2023/04/19 13:53:00 UTC
[jira] [Created] (KAFKA-14922) kafka-streams-application-reset deletes topics not belonging to specified application-id
Jørgen created KAFKA-14922:
------------------------------
Summary: kafka-streams-application-reset deletes topics not belonging to specified application-id
Key: KAFKA-14922
URL: https://issues.apache.org/jira/browse/KAFKA-14922
Project: Kafka
Issue Type: Bug
Affects Versions: 3.4.0
Reporter: Jørgen
Slack-thread: [https://confluentcommunity.slack.com/archives/C48AHTCUQ/p1681908267206849]
When running the command _kafka-streams-application-reset --bootstrap-servers $BOOTSTRAP --application-id foo_ all changelog and repartition topics that _starts with_ foo is deleted. This happens even if there's no application-id named foo.
Example:
{code:java}
Application IDs:
foo-v1
foo-v2
Internal topics:
foo-v1-repartition-topic-repartition
foo-v2-repartition-topic-repartition
Application reset:
kafka-streams-application-reset --bootstrap-servers $BOOTSTRAP --application-id foo
> No input or intermediate topics specified. Skipping seek.
Deleting inferred internal topics [foo-v2-repartition-topic-repartition, foo-v1-repartition-topic-repartition]
Done.{code}
Expected behaviour is that the command fails as there are no application-id's with the name foo instead of deleting all foo* topics.
This is critical on typos or if application-ids starts with the same name as others.
The bug should be located here: [https://github.com/apache/kafka/blob/c14f56b48461f01743146d58987bc8661ba0d459/tools/src/main/java/org/apache/kafka/tools/StreamsResetter.java#L693]
Should check that the topics matches the application-id exactly instead of checking that it starts.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)