This is an automated email from the ASF dual-hosted git repository.

technoboy pushed a commit to branch branch-2.11
in repository https://gitbox.apache.org/repos/asf/pulsar.git


The following commit(s) were added to refs/heads/branch-2.11 by this push:
     new 39cc14a5ae9 [improve] [broker] Print warn log if compaction failure 
(#19405)
39cc14a5ae9 is described below

commit 39cc14a5ae9efd84276e996efe5928228b961c11
Author: fengyubiao <[email protected]>
AuthorDate: Sat Feb 4 14:15:50 2023 +0800

    [improve] [broker] Print warn log if compaction failure (#19405)
---
 .../org/apache/pulsar/broker/service/persistent/PersistentTopic.java | 5 +++++
 1 file changed, 5 insertions(+)

diff --git 
a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentTopic.java
 
b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentTopic.java
index f8f5d5d744f..61385e09d0d 100644
--- 
a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentTopic.java
+++ 
b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentTopic.java
@@ -2782,6 +2782,11 @@ public class PersistentTopic extends AbstractTopic 
implements Topic, AddEntryCal
             throws PulsarServerException, AlreadyRunningException {
         if (currentCompaction.isDone()) {
             currentCompaction = 
brokerService.pulsar().getCompactor().compact(topic);
+            currentCompaction.whenComplete((ignore, ex) -> {
+               if (ex != null){
+                   log.warn("[{}] Compaction failure.", topic, ex);
+               }
+            });
         } else {
             throw new AlreadyRunningException("Compaction already in 
progress");
         }

Reply via email to