codelipenghui opened a new pull request #11389:
URL: https://github.com/apache/pulsar/pull/11389


   ### Motivation
   
   Currently, the read ReadHandle only invalidates when removing the ledger 
from the ManagedLedger.
   If the ManagedLedger has many ledgers(the topic might retain infinite data), 
we will get oom
   on the direct memory since we are using 1MB read cache by default for the 
offloaded data ReadHandle.
   
   If all the cursors are consumed data, the ReadHandle can be closed safely. 
And if a cursor reset
   to an earlier position to consume the historical data, the ReadHandle will 
be reopened again.
   
   ### Verifying this change
   
   New tests were added to ensure the ReadHandle had been invalidated property.
   
   ### Does this pull request potentially affect one of the following parts:
   
   *If `yes` was chosen, please highlight the changes*
   
     - Dependencies (does it add or upgrade a dependency): (no)
     - The public API: (no)
     - The schema: (no)
     - The default values of configurations: (no)
     - The wire protocol: (no)
     - The rest endpoints: (no)
     - The admin cli options: (no)
     - Anything that affects deployment: (no)
   
   


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