This is an automated email from the ASF dual-hosted git repository. lhotari pushed a commit to branch branch-3.3 in repository https://gitbox.apache.org/repos/asf/pulsar.git
commit c62510acd0c07d10f6ea0e5f0537ca4ddcb8c6c5 Author: Rajan Dhabalia <[email protected]> AuthorDate: Tue Nov 5 12:40:15 2024 -0800 [fix][broker] fix logging with correct error message while loading the topic (#23544) (cherry picked from commit ce0c1bbd9d328dd697548f3e7cde5de10e5aff72) --- .../main/java/org/apache/pulsar/broker/service/BrokerService.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/BrokerService.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/BrokerService.java index cb121b66356..be030b11f9a 100644 --- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/BrokerService.java +++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/BrokerService.java @@ -1815,7 +1815,10 @@ public class BrokerService implements Closeable { }, () -> isTopicNsOwnedByBrokerAsync(topicName), null); }).exceptionally((exception) -> { - log.warn("[{}] Failed to get topic configuration: {}", topic, exception.getMessage(), exception); + boolean migrationFailure = exception.getCause() instanceof TopicMigratedException; + String msg = migrationFailure ? "Topic is already migrated" : + "Failed to get topic configuration:"; + log.warn("[{}] {} {}", topic, msg, exception.getMessage(), exception); // remove topic from topics-map in different thread to avoid possible deadlock if // createPersistentTopic-thread only tries to handle this future-result pulsar.getExecutor().execute(() -> topics.remove(topic, topicFuture));
