coderzc commented on code in PR #21745:
URL: https://github.com/apache/pulsar/pull/21745#discussion_r1437736151


##########
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()) {

Review Comment:
   To avoid  `isClosingOrDeleting` being changed before the compaction is 
triggered.



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