Skip to content

Commit

Permalink
[pulsar-broker] avoid retrying deleting namespace when topic is alrea…
Browse files Browse the repository at this point in the history
…dy deleted/fenced (apache#4665)
  • Loading branch information
rdhabalia authored and merlimat committed Jul 3, 2019
1 parent 7afdf6b commit b367206
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -890,8 +890,11 @@ private CompletableFuture<Void> checkReplicationAndRetryOnFailure() {
}).exceptionally(th -> {
log.error("[{}] Policies update failed {}, scheduled retry in {} seconds", topic, th.getMessage(),
POLICY_UPDATE_FAILURE_RETRY_TIME_SECONDS, th);
brokerService.executor().schedule(this::checkReplicationAndRetryOnFailure,
POLICY_UPDATE_FAILURE_RETRY_TIME_SECONDS, TimeUnit.SECONDS);
if (!(th.getCause() instanceof TopicFencedException)) {
// retriable exception
brokerService.executor().schedule(this::checkReplicationAndRetryOnFailure,
POLICY_UPDATE_FAILURE_RETRY_TIME_SECONDS, TimeUnit.SECONDS);
}
result.completeExceptionally(th);
return null;
});
Expand Down

0 comments on commit b367206

Please sign in to comment.