coderzc commented on code in PR #21745:
URL: https://github.com/apache/pulsar/pull/21745#discussion_r1437741202
##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentTopic.java:
##########
@@ -3420,17 +3448,29 @@ public void readEntryFailed(ManagedLedgerException
exception, Object ctx) {
public synchronized void triggerCompaction()
throws PulsarServerException, AlreadyRunningException {
if (currentCompaction.isDone()) {
+ if (!lock.readLock().tryLock()) {
+ log.info("[{}] Topic is closing or deleting, skip triggering
compaction -lock", topic);
+ return;
+ }
+ try {
+ if (isClosingOrDeleting) {
+ log.info("[{}] Topic is closing or deleting, skip
triggering compaction -flag", topic);
Review Comment:
I think this should be an expected behavior. It should skip triggering
compaction if topic is closing or deleting.
I optimized the logs.
--
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]