void-ptr974 commented on code in PR #25914:
URL: https://github.com/apache/pulsar/pull/25914#discussion_r3338145660


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/BacklogQuotaManager.java:
##########
@@ -196,6 +194,10 @@ private void dropBacklogForSizeLimit(PersistentTopic 
persistentTopic, BacklogQuo
                     log.debug().attr("slowestConsumer", 
slowestConsumer).log("no messages to skip for");
                     break;
                 }
+                beforeBacklogQuotaCursorMutation(persistentTopic);
+                if (shouldStopEvictionOnTopicClose(persistentTopic)) {

Review Comment:
   This check is useful because it is close to the actual cursor mutation point.
   
   The remaining subtle case is:
   
   1. this check returns false
   2. topic close/delete starts right after that
   3. eviction still proceeds to `skipEntries` / `markDelete`
   
   So I think we should clarify whether this is intended as a best-effort race 
reduction, or whether we need stronger coordination to strictly avoid cursor 
mutation once topic close/delete starts.



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