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

   Fixes https://github.com/apache/pulsar/issues/16584
   
   ### Motivation
   
   With the `RangeCache`, it is hard to reason about its behavior other than 
cache hits/misses or the cache's size hitting the limit and triggering a size 
based eviction. This PR adds 3 new metrics to help provide additional insight 
into the cache's behavior. It adds `pulsar_ml_cache_inserted_entries_total`, 
`pulsar_ml_cache_evicted_entries_total`, and `pulsar_ml_cache_entries`.
   
   ### Modifications
   
   * Add new metrics for cache insertion, eviction, and current number of 
entries.
   * Add new methods to the `ManagedLedgerFactoryMXBean` interface.
   * Update several method return values in the `RangeCache`.
   * Update tests.
   
   ### Verifying this change
   
   This change is covered by modified tests that already existed.
   
   ### Does this pull request potentially affect one of the following parts:
   
   There is a breaking change to the `RangeCache` class for the `clear` and the 
`evictLEntriesBeforeTimestamp` methods. The previous result was a `long`, and 
now it is a `Pair<Integer, Long>`. The new result matches the same style as 
`evictLeastAccessedEntries`. Given that this class is only meant for use within 
the broker, I think it is reasonable to break these methods. I will send a note 
to the mailing list.
   
   ### Documentation
     
   - [x] `doc` 
   


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