Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

Commit

Permalink
remove cache if can not get broker address when a broker node lost
Browse files Browse the repository at this point in the history
  • Loading branch information
dockerzhang committed Jan 26, 2021
1 parent 241800b commit 47b9f87
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1521,6 +1521,7 @@ public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) {
if (matchBrokers.isEmpty()) {
log.error("No node for broker {} under zk://loadbalance", pulsarAddress);
returnFuture.complete(Optional.empty());
topicManager.removeTopicManagerCache(topic.toString());
return;
}

Expand All @@ -1538,6 +1539,7 @@ public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) {
if (th != null) {
log.error("Error in getDataAsync() for {}", pulsarAddress, th);
returnFuture.complete(Optional.empty());
topicManager.removeTopicManagerCache(topic.toString());
return;
}

Expand All @@ -1561,6 +1563,7 @@ public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) {
} catch (Exception e) {
log.error("Error in {} lookupFuture get: ", pulsarAddress, e);
returnFuture.complete(Optional.empty());
topicManager.removeTopicManagerCache(topic.toString());
return;
}

Expand Down

0 comments on commit 47b9f87

Please sign in to comment.