heesung-sn commented on code in PR #23522:
URL: https://github.com/apache/pulsar/pull/23522#discussion_r1820006750


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

Review Comment:
   I am not sure if this is a good practice to have a local var to control the 
unfenceTopicToResume() member func. Wouldn't it be cleaner if we can make this 
member func idempotent?(return early if the topic "state" is already unfenced.)
   
   This brings back our earlier discussion that we probably need to refactor 
the topic state and its state handler logic.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to