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

   **Describe the bug**
   
   #12045 changed cache eviction. The problem is that cache eviction is done to 
the position whatever happens to be the first cursor in the "heap" list in 
ManagedCursorContainer. There's a chance for a race condition: another cursor 
in the list might have an older position, but that hasn't been updated in the 
ordered data structure ("heap") when the method is called. The cache eviction 
will take the read position directly from the first cursor and it ignores and 
older positions.
   When the consumer for the other cursor does a read, the entries are no more 
in the cache and there will be a cache miss. 
   
   **To Reproduce**
   
   It should be possible to reproduce this in a multi-consumer scenario where 
the speed of the consumers varies.
   
   **Expected behavior**
   
   Cache eviction should properly consider all active consumers. This was the 
state before #12045 and #14985 changes.
   
   **Additional context**
   #12045, #14985, #16049
   


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