hanmz opened a new issue, #20368:
URL: https://github.com/apache/pulsar/issues/20368

   ### Search before asking
   
   - [X] I searched in the [issues](https://github.com/apache/pulsar/issues) 
and found nothing similar.
   
   
   ### Version
   
   2.9.2
   
   ### Minimal reproduce step
   
   1、In class OpFindNewest, first, execute the method [readEntryComplete] 
[checkFirst] logic, if the condition [condition.apply(entry)] executes 
successfully, set the searchPosition=lastPosition and 
lastMatchedPosition=position, then execute find() method.
   
   2、In the find() method, if cursor is not null, call 
cursor.hasMoreEntries(searchPosition).Even if there are still messages later 
searchPosition, if the message is acked, the method 
[cursor.hasMoreEntries(searchPosition)] may still return false.
   
   3、If the method [cursor.hasMoreEntries(searchPosition)] return false, will 
return lastMatchedPosition directly.
   
   4、In this case, it will return earliest position.
   
   
   ### What did you expect to see?
   
   x
   
   ### What did you see instead?
   
   x
   
   ### Anything else?
   
   _No response_
   
   ### Are you willing to submit a PR?
   
   - [X] I'm willing to submit a PR!


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