psalagnac opened a new pull request, #2304:
URL: https://github.com/apache/solr/pull/2304

   https://issues.apache.org/jira/browse/SOLR-17160
   
   This is a simpler version of #2271, that now uses Caffeine cache instead of 
manually dropping old requests.
   
   # Description
   
   Core admin completed/failed requests are tracked in-memory, but we only 
track a maximum of 100 requests by dropping the oldest ones. If for any reason 
we drop a request before the client (an other Solr node) fetched the status, we 
will get unexpected errors at the top level command.
   
   # Solution
   
   Instead of the hard limit of 100 tracked requests, we track all requests in 
a Caffeine cache, configured to drop old requests.
   This is a trade-off to not keep memory forever and to be sure we won't lose 
status in the case of many incoming requests.
   
   The change adds two different timeouts:
   - an hour for every requests (overridable with property 
`"solr.admin.requests.running.timeout.minutes"`)
   - 5 minutes for completed/failed requests once the status is already 
retrieved by client (overridable with property 
`"solr.admin.requests.completed.timeout.minutes"`)
   
   # Tests
   
   Added a unit test in `CoreAdminHandlerTest` to check expired requests are 
not tracked in-memory anymore.
   
   Also checks we don't have any issue for collection backup with very high 
numbers of shards.
   
   # Checklist
   
   Please review the following and check all that apply:
   
   - [x] I have reviewed the guidelines for [How to 
Contribute](https://github.com/apache/solr/blob/main/CONTRIBUTING.md) and my 
code conforms to the standards described there to the best of my ability.
   - [x] I have created a Jira issue and added the issue ID to my pull request 
title.
   - [x] I have given Solr maintainers 
[access](https://help.github.com/en/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork)
 to contribute to my PR branch. (optional but recommended)
   - [x] I have developed this patch against the `main` branch.
   - [x] I have run `./gradlew check`.
   - [x] I have added tests for my changes.
   - [ ] I have added documentation for the [Reference 
Guide](https://github.com/apache/solr/tree/main/solr/solr-ref-guide)
   


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

Reply via email to