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


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentMessageExpiryMonitor.java:
##########
@@ -201,6 +202,7 @@ public void markDeleteComplete(Object ctx) {
         @Override
         public void markDeleteFailed(ManagedLedgerException exception, Object 
ctx) {
             log.warn("[{}][{}] Message expiry failed - mark delete failed", 
topicName, subName, exception);
+            expirationCheckInProgress = FALSE;

Review Comment:
   > is it better to set expirationCheckInProgress = FALSE; after 
updateRates();? otherwise there might still be a chance of this issue occurring.
   
   Since the callback of the mark delete is completed, the state should be 
reset. Could you explain the issue you guessed?
   
   > After further investigation, I found that this PR may not address the root 
cause. The cursor reset in progress error does not appear to be caused by 
concurrent calls to expireMessage or ManagedCursor.asyncMarkDelete. Instead, 
the issue likely stems from another code path that triggers 
ManagedCursorImpl.asyncResetCursor.
   
   They are different cases, the current PR focuses on multiple expiring 
messages executing concurrently, I will submit a proposal to solve the race 
condition between reset cursor and expiring messages later



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