apache / apache/shenyu

[BUG] ShenyuClientURIExecutorSubscriber blocks the Disruptor consumer forever on an unreachable host:port

Open
#6,554 1 comment 0 reactions 0 assignees View on GitHub
client: register priority: medium type: bug
Dominant language
Java
Stars
8.8k
Forks
3.1k
Avg merge
7d 1h
Merged PRs (30d)
85

Description

## Description
`while(true)` only exits on a successful TCP connect; there is no max-retry/timeout. This runs on the Disruptor's single consumer thread, so a single misconfigured `host`/`port` (or a client that never opens the port) keeps the connect loop spinning forever. Every subsequent registration event of any type (URI, metadata, apiDoc, mcp) is queued behind it and never processed.

## Location
```
shenyu-client-core/.../disruptor/subcriber/ShenyuClientURIExecutorSubscriber.java:76-99
```

## Impact
A single unreachable URI stalls the entire client-side registration pipeline indefinitely — no metadata/URI/apiDoc for any other service in the same JVM is ever published.

## Suggested fix
Bound the wait (fail after a configurable max elapsed time/attempts and publish an OFFLINE/error event), or perform the connect-wait off the Disruptor consumer thread.

## Related existing issue(s)
None

_Identified during the 2026-08-02 audit; full list in [`docs/issue-candidates-2026-08-02.md`](docs/issue-candidates-2026-08-02.md)._

Contributor guide

No contributing guide indexed for this repository

Research direction

Read shenyu-client-core/.../disruptor/subcriber/ShenyuClientURIExecutorSubscriber.java:76-99 and trace how the Disruptor consumer handles registration events. Reproduce the behavior with an unreachable host:port, then determine and test a bounded failure or off-thread approach so later URI, metadata, apiDoc, and mcp events are processed and an OFFLINE/error event is published.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend, distributed-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.