Skip to content

Java Rest Client swallows exceptions #39910

@BBK-PiJ-2012-88

Description

@BBK-PiJ-2012-88

Describe the feature:

Elasticsearch version (bin/elasticsearch --version): 5.* and 6.*

Plugins installed: []

JVM version (java -version):

OS version (uname -a if on a Unix-like system):

Description of the problem including expected versus actual behavior:

Actual Behaviour

Make a request to an elastic cluster using the java rest client that fails with a transient exception. If the initial request to the cluster takes longer to fail than the max retry timeout millis the request fails with an IOException and the cause of the initial failure is not added as a suppressed exception.

Expected Behaviour:

Make a request to an elastic cluster using the java rest client that fails with a transient exception. If the initial request to the cluster takes longer to fail than the max retry timeout millis the initial reason for the failure should be added to the IOException as a suppressed exception (this is the behaviour if the client attempts 1+ retry attempts).

Steps to reproduce:

This issue is hard to reproduce in a deterministic fashion. However, we encounter the issue fairly frequently with max retry timeout millis set to 1ms.

Provide logs (if relevant):

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions