BewareMyPower opened a new pull request, #16400: URL: https://github.com/apache/pulsar/pull/16400
### Motivation Related issue: https://github.com/streamnative/kop/issues/1379 KoP uses reader on a single partition of a compacted topic and we observed a lot of logs like: > Error reading entries at 928511:1 : We can only have a single waiting callback It happened on a `ManagedCursorImpl` when `hasMoreEntries` returns false, `asyncReadEntriesOrWait` is called for multiple times before `cancelPendingReadRequest` or new messages arrived. ### Modifications Add a `canNotReadMoreEntries` method to detect the case that there is already a pending read request while there are no more entries. Then skip reading in `readMoreEntries`. In addition, this PR reverts the redundant synchronized block introduced from https://github.com/apache/pulsar/pull/14716. -- 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]
