dsmiley opened a new pull request, #4516:
URL: https://github.com/apache/solr/pull/4516
I have replaced the custom `ConcurrentLRUCache` implementation and the
`org.apache.solr.common.util.Cache` interface with Caffeine's `Cache` in
`solr-core`.
Key changes:
1. **Refactored `solr-solrj`**:
* Refactored `JavaBinCodec.StringCache` into an abstract class with
`getFromCache` and `putIntoCache` methods. This keeps `solrj` independent of
Caffeine.
* Updated `ObjectCache` to use `ConcurrentHashMap` directly and fixed
its `computeIfAbsent` methods to ensure compatibility with existing call-sites
(like `IndexSchemaFactory`).
* Removed `org.apache.solr.common.util.Cache` and `MapBackedCache`.
2. **Updated `solr-core`**:
* Replaced `ConcurrentLRUCache` with Caffeine's `Cache` in
`IndexSchema` and `TemplateUpdateProcessorFactory`.
* Deleted `org.apache.solr.util.ConcurrentLRUCache`.
3. **Updated Tests**:
* Modified `TestJavaBinCodec` to use a `HashMap`-based implementation
of the now-abstract `StringCache`.
* Cleaned up test code that referenced the deleted cache classes.
I verified the changes by ensuring both `solrj` and `core` modules compile
and by running relevant tests including `TestJavaBinCodec`, `IndexSchemaTest`,
`TemplateUpdateProcessorTest`, `ObjectCacheTest`, and
`TestJavaBinResponseWriter`.
---
*PR created automatically by Jules for task
[10202347838202579826](https://jules.google.com/task/10202347838202579826)
started by @dsmiley*
---
Fork PR: https://github.com/dsmiley/solr/pull/28
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]