void-ptr974 commented on PR #25914: URL: https://github.com/apache/pulsar/pull/25914#issuecomment-4697516110
There is still a race in the precise time-based eviction path. dropBacklogForTimeLimit() calls subscription.getExpiryMonitor().expireMessages(target), but the actual cursor advancement happens later in PersistentMessageExpiryMonitor.findEntryComplete() via cursor.asyncMarkDelete(...). That asyncMarkDelete(...) is not protected by the new topic close/delete read-lock guard. Suggested minimal fix: move the guard to the actual mutation point. In PersistentMessageExpiryMonitor.findEntryComplete(), acquire the topic close read lock, re-check the closing/deleting state, and only then call cursor.asyncMarkDelete(...). If the topic is already closing/deleting, reset expirationCheckInProgress and skip the mark-delete. This keeps the fix local to the expiry-driven cursor advancement path and avoids changing the broader close/delete lifecycle. -- 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]
