Skip to content

[BUG] ExponentialRetryBackoffStrategy retries only on IllegalStateException, never on real network errors #6636

Closed

Description

@Aias00
  • severity: High
  • files: shenyu-plugin/shenyu-plugin-httpclient/src/main/java/org/apache/shenyu/plugin/httpclient/ExponentialRetryBackoffStrategy.java:65
  • description: initDefaultBackoff builds Retry.backoff(...).filter(t -> t instanceof IllegalStateException). The actual outbound failures — ConnectTimeoutException, ReadTimeoutException, IOException, WebClientResponseException, "Connection prematurely closed" — are not IllegalStateException, so retryWhen never retries them. Compare FixedRetryStrategy which has no filter (retries all).
  • impact: Operators configuring retryBackoffSpec=exponential get zero retries on transient connection/timeout failures — silent no-op.
  • suggested_fix: Broaden the filter to admit IOException/TimeoutException/ConnectTimeoutException/ReadTimeoutException, or drop the filter.
  • confidence: High
  • related_existing: none — [BUG] Exponential/Fixed retry strategies: outer timeout neuters configured retry count #6583/PERF-32 is the outer .timeout() wrapping; this is the inner .filter() that suppresses all retries regardless.

Identified during the 2026-08-02 deep re-scan; full list in docs/scan2-2026-08-02/00-consolidated-critical-high.md.

Activity

  1. added
    type: bug
    priority: high
    on Aug 3, 2026
  2. github-actions commented on Aug 3, 2026

    @github-actions
    Contributor

    👋 Hello @Aias00

    A new issue has been opened by @Aias00:

    Please review when you have time. Thank you! 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    plugin: http-clientpriority: hightype: bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions