jerrypeng opened a new pull request #6787: URL: https://github.com/apache/pulsar/pull/6787
### Motivation When using Readers API, backlog quotas are still enforced on these ephemeral readers. ### Modifications If a cursor is non-durable then we don't add it to the min-heap we are using keep track of the slowest cursor. We use in the min-heap to access the slowest cursor for backlog and quota calculations. It is also used to determine up to which ledger we can trim. Thus, with this change, reader's ephemeral subscriptions won't be preventing ledgers from being clean up as well which is what you expect the behavior to be. There are some caveats to the above. Since triggering of trimming of ledgers is piggy packed on top of ledger operations, if there is no new data coming in ledgers will not be trimmed. The most recently closed ledger we be persisted past any retention. Perhaps in a subsequent PR, we implement the trimming to be trigger on a schedule as well. ### Verifying this change Added a test to verify that readers don't cause any backlog issues ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected]
