SOLR-17106: LBSolrClient - Make zombie ping checks configurable
https://issues.apache.org/jira/browse/SOLR-17106
Description
Please provide a short description of the changes you're making with this pull request. The issue involves scalability challenges in SolrJ's LBSolrClient when a pod with numerous cores experiences connectivity problems. The "zombie" ping checking mechanism, operating on a core basis, becomes a bottleneck during distributed search on a massive multi shard collection. Threads attempting to reach unhealthy cores contribute to a high computational load, causing performance issues.
LBSolrClient could be configured to disable zombie "ping" checks, but retain zombie tracking. Once a replica/endpoint is identified as a zombie, it could be held in zombie state for X seconds, before being released - hoping that by this timeframe ZK would be updated to mark this endpoint DOWN or the pod is back up and CloudSolrClient would avoid querying it. In any event, only 1 failed query would be needed to send the server back to zombie state.
Dev list thread: https://lists.apache.org/thread/f0zfmpg0t48xrtppyfsmfc5ltzsq2qqh
Solution
Please provide a short description of the approach taken to implement your solution.
Modified the code to make zombie ping checking configurable through a new property named "enableZombiePingChecks." When set to true, the system is designed to periodically send zombie ping requests every zombiePingIntervalMillis. Conversely, setting it to false disables zombie pings and instead monitors the "zombieServers" every zombieStateMonitoringIntervalMillis. This monitoring identifies replicas or endpoints that have spent at least minZombieReleaseTimeMillis as zombies, subsequently releasing them from the zombie state and adding them back to the alive set.
The default configuration for zombiePingIntervalMillis remains at 1 minute, while zombieStateMonitoringIntervalMillis is currently set to 5 seconds, and minZombieReleaseTimeMillis is configured at 10 seconds.
Corresponding tests in TestLBHttp2SolrClient and TestLBHttpSolrClient have been adjusted accordingly.
Tests
Please describe the tests you've developed or run to confirm this patch implements the feature or solves the problem. Slight refactoring in TestLBHttp2SolrClient and TestLBHttpSolrClient, added a new test testReliabilityWithoutZombiePingChecks in TestLBHttp2SolrClient. All tests pass.
Checklist
Please review the following and check all that apply:
- [x] I have reviewed the guidelines for How to Contribute 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 to contribute to my PR branch. (optional but recommended)
- [x] I have developed this patch against the
mainbranch. - [x] I have run
./gradlew check. - [x] I have added tests for my changes.
- [ ] I have added documentation for the Reference Guide
This PR had no visible activity in the past 60 days, labeling it as stale. Any new activity will remove the stale label. To attract more reviewers, please tag someone or notify the [email protected] mailing list. Thank you for your contribution!
Aparna, are we just missing use of EnvUtils here? I know we've taken this change as-is (in our fork) but even we don't have that, thus it's hard to actually use the changes configured here.
This PR has had no activity for 60 days and is now labeled as stale. Any new activity or converting it to draft will remove the stale label. To attract more reviewers, please tag people who might be familiar with the code area and/or notify the [email protected] mailing list. Thank you for your contribution!
This PR is now closed due to 60 days of inactivity after being marked as stale. Re-opening this PR is still possible, in which case it will be marked as active again.