SOLR-17160: Time based tracking of core admin requests #2271
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
https://issues.apache.org/jira/browse/SOLR-17160
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 with a expiration timeout. 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:
"solr.admin.requests.running.timeout.minutes"
)"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:
main
branch../gradlew check
.