poorbarcode opened a new pull request, #17264:
URL: https://github.com/apache/pulsar/pull/17264

   ### Motivation
   
   see: 
   
   #17220
   
   Current implementation: `ManagedCursor` will skip the invalid data during 
`recover`, even if the feature `autoSkipNonRecoverableData ` is disabled.
   
   Ledger data invalid occurs in two cases: 
   
   - ledger could not be found
   - some entries could not be found
   
   ----
   
   #### Ledger could not be found
   
   When the ledger could not be found, we can recover data from ZK. But when 
switching ledger, data stored in ZK does not contain 
`individualDeletedMessages`, so we can only recover `markDeletedPosition` from 
ZK. The current code already implements this.
   
   #### Some entries could not be found
   
   When the last entry is could not be found, we can trace the entry forward 
until one available entry is found, so as to recover data as much as possible. 
This PR resolves this.
   
   ### Modifications
   
   - As to recover data as much as possible when latest entry could not be found
   - Add some unit tests for `cursor.recover`
   
   
   ### Documentation
   
   - [ ] `doc-required` 
   
     
   - [x] `doc-not-needed` 
   
     
   - [ ] `doc` 
   
   
   - [ ] `doc-complete`
   


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