Skip to content

Commit

Permalink
fix: remove execution retries from DROP STREAM DELETE TOPIC
Browse files Browse the repository at this point in the history
Retrying a DROP STREAM DELETE TOPIC commands are delayed when
retrying the failed command. This is not necessary when the
TopicDeletionDisabledException is False, and even for any
other error. Users can retry the command manually if it fails.
  • Loading branch information
spena committed Jul 17, 2019
1 parent 533dac3 commit 22bffea
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@
import io.confluent.ksql.services.ServiceContext;
import io.confluent.ksql.statement.ConfiguredStatement;
import io.confluent.ksql.statement.Injector;
import io.confluent.ksql.util.ExecutorUtil;
import io.confluent.ksql.util.ExecutorUtil.RetryBehaviour;
import io.confluent.ksql.util.KsqlConstants;
import io.confluent.ksql.util.KsqlException;
import java.util.Objects;
Expand Down Expand Up @@ -93,9 +91,7 @@ public <T extends Statement> ConfiguredStatement<T> inject(

if (source != null) {
try {
ExecutorUtil.executeWithRetries(
() -> topicClient.deleteTopics(ImmutableList.of(source.getKafkaTopicName())),
RetryBehaviour.ALWAYS);
topicClient.deleteTopics(ImmutableList.of(source.getKafkaTopicName()));
} catch (Exception e) {
throw new KsqlException("Could not delete the corresponding kafka topic: "
+ source.getKafkaTopicName(), e);
Expand Down

0 comments on commit 22bffea

Please sign in to comment.