SOLR-18002: idle timeouts should cause servers to be added to the zombie list #3891
+93
−2
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-18002
Description
When a server exceeds the idle timeout it triggers a
TimeoutExceptionwhich is skipped when checking whether the server should be marked as a zombie. This results in unresponsive servers continuing to receive traffic and high client latencies as the idle timeout is consistently triggered on every request to that replica.Another option for handling this would be to track timeouts to that server over a period of time and only mark it as a zombie past some threshold. This would be a little more involved but might better handle random slow requests. Other exceptions mark the server as a zombie immediately, so this PR follows that pattern.
Solution
This change includes
TimeoutExceptionin the list of exceptions that mark a server as a zombie.Tests
This adds an integration test that leverages
ServerSocketto create a blackhole server which lets a client connect but never responds, thus triggering the idleTimeout error condition.Checklist
Please review the following and check all that apply:
mainbranch../gradlew check.