You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2023/01/04 13:08:53 UTC

[GitHub] [pulsar] eolivelli commented on a diff in pull request #19129: [fix][broker] Topic could be in fenced state forever if deletion fails

eolivelli commented on code in PR #19129:
URL: https://github.com/apache/pulsar/pull/19129#discussion_r1061460903


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentTopic.java:
##########
@@ -1289,6 +1289,11 @@ public void deleteLedgerComplete(Object ctx) {
                 });
 
                 return deleteFuture;
+                }).whenComplete((value, ex) -> {
+                    if (ex != null) {
+                        unfenceTopicToResume();
+                        log.error("[{}] Error deleting topic", topic, ex);

Review Comment:
   It is better to log before calling unfenceTopicToResume



##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentTopic.java:
##########
@@ -1289,6 +1289,11 @@ public void deleteLedgerComplete(Object ctx) {
                 });
 
                 return deleteFuture;
+                }).whenComplete((value, ex) -> {

Review Comment:
   nit: you could use 'exceptionally'
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org