poorbarcode commented on code in PR #23980:
URL: https://github.com/apache/pulsar/pull/23980#discussion_r1955482414


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentTopic.java:
##########
@@ -1340,18 +1341,42 @@ private void 
asyncDeleteCursorWithCleanCompactionLedger(PersistentSubscription s
             return;
         }
 
-        currentCompaction.handle((__, e) -> {
-            if (e != null) {
-                log.warn("[{}][{}] Last compaction task failed", topic, 
subscriptionName);
+        // Avoid concurrently execute compaction and unsubscribing.
+        synchronized (this) {
+            if (!disablingCompaction.compareAndSet(false, true)) {
+                unsubscribeFuture.completeExceptionally(

Review Comment:
   Could you mention the code line? I could not find it.



-- 
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