[
https://issues.apache.org/jira/browse/KAFKA-14922?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18090014#comment-18090014
]
Matthias J. Sax commented on KAFKA-14922:
-----------------------------------------
{quote}It won't be possible to force delete members without compromising on
having to provide a valid application id.
{quote}
Re-reading the ticket history, not sure any longer if I agree to this
statement? "force delete members" only makes sense for a valid group. If a
non-valid group/application id is provided, it means the group does not exist
and thus there is no members which would need to get deleted?
In the end, we currently have a guard to not execute the reset if the group is
not empty. Thus, we can --force the reset by deleting active members
pro-actively; note, the semantics of --force is generic; to _force_ the reset.
So if we want to add a check if a group exists, and refuse the reset if a group
does not exists, the same --force semantics apply high level. Ignore a check
and force the reset.
I have no objections to have two flags either, but it seems unnecessary to me,
and personally I think it would be ok to use the existing `--force` for both
cases.
Doing a KIP could still be a good thing to do. But strictly not necessary,
assuming the above explained semantics of "force the reset" – again, `--forces`
_semantics_ is not to "delete members"; deleting member is an impl detail about
what to do, to execute the force). So re-using --force to skip the group exist
check is IMHO no semantic change, but only a change of the implementation. So
no KIP needed IMHO.
Just my 2ct. I am fine either way :)
> 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
> Components: streams, tools
> Affects Versions: 3.4.0
> Reporter: Jørgen
> Assignee: Preethi KCS
> Priority: Major
> Labels: beginner, needs-kip, newbie
>
> Slack-thread:
> [https://confluentcommunity.slack.com/archives/C48AHTCUQ/p1681908267206849]
> When running the command _kafka-streams-application-reset --bootstrap-servers
> $BOOTSTRAP --application-id foo_ all internal 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 (for example if we had foo-v21 and wanted to reset foo-v2)
> 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 with the application-id.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)