racorn opened a new issue #6432: Log automatic topic compaction failures URL: https://github.com/apache/pulsar/issues/6432 **Describe the bug** If a namespace is set up with a `compaction-threshold`, compaction should be triggered automatically. I configured a namespace with compaction, produced messages, and in the main log file, I could see that 'phase one' of compaction was started. But there was no sign of phase two, and no WARN or ERROR message. I tried manual compaction with `bin/pulsar compact-topic --topic persistent://tenant/namespace/topic` and then there was reported an error (TimeoutException) **Expected behavior** If automatic triggered compaction fails, it should be logged in the broker log file. **Discussion** `org.apache.pulsar.broker.service.persistent.PersistentTopic#triggerCompaction()` starts compaction, but does not report any failures. For example, one could add logging with ``` public synchronized void triggerCompaction() throws PulsarServerException, AlreadyRunningException { if (currentCompaction.isDone()) { currentCompaction = brokerService.pulsar().getCompactor().compact(topic); currentCompaction.whenComplete((ledger, error) -> { if (error != null) { log.error( ... ... } else { throw new AlreadyRunningException("Compaction already in progress"); } } ``` **Additional context** Pulsar 2.5.0 release
---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
