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


   Currently, if the data has been compacted and the reader tries to read from 
the start of the topic,
   the read not able to read any data due to the start position will be changed 
when recovery the NonDurableCursor.
   The start position will be changed to the first position of the ledgers, but 
there are some earlier data in the
   compacted ledger. So the reader will lose the compacted data.
   
   The fix is adding a force start position option for creating a 
NonDurableCursor.
   
   1. If there is compacted context, use the first entry of the compacted 
ledger as the start position
   2. Force seeks to a position without comparing with the mark deletion 
position / LAC when reading data from the compacted ledger.
   3. Don't rewind the non-durable cursor during the message reading
   
   ### 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)
   
   ### Documentation
   
     - Does this pull request introduce a new feature? (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