Aias00 opened a new issue, #6789:
URL: https://github.com/apache/shenyu/issues/6789

   - Severity: Medium
   - Location:
   
`shenyu-client/shenyu-client-mcp/shenyu-client-mcp-register/src/main/java/org/apache/shenyu/client/mcp/McpServiceEventListener.java:105-107`;
 consumed at 
`shenyu-client/shenyu-client-core/src/main/java/org/apache/shenyu/client/core/client/AbstractContextRefreshedEventListener.java:155-158`
   - 
   Description:
   `buildURIRegisterDTO` returns `null`. The parent `onApplicationEvent` does 
not null-check the result and, in local discovery mode (the default: 
`shenyu.discovery.type` defaults to `DISCOVERY_LOCAL_MODE`), calls 
`publisher.publishEvent(buildURIRegisterDTO(...))` once per namespace — i.e. 
`publisher.publishEvent(null)`. 
`ShenyuClientRegisterEventPublisher.publishEvent` → 
`DisruptorProvider.onData(null)` → `ringBuffer.publishEvent(translatorOneArg, 
null)`, enqueuing a null `DataTypeParent` for 
`ShenyuClientURIExecutorSubscriber` to process. Every other client (SOFA `:75`, 
Tars `:106`, WebSocket `:123`) returns a real `URIRegisterDTO`.
   - 
   Impact:
   Repeated null events enter the register disruptor on every context refresh 
in default discovery mode; the subscriber NPEs on the null payload. The 
disruptor swallows the exception to logs (no crash), but spams errors and 
wastes queue slots.
   - 
   Suggested fix:
   Return a real (minimal) `URIRegisterDTO` for MCP, or make the parent skip 
`publishEvent` when `buildURIRegisterDTO` returns null, or override discovery 
handling so URI publishing is bypassed for MCP.
   - 
   Confidence: Medium
   - Related existing: none — FUNC-B4 (`ShenyuClientURIExecutorSubscriber block 
forever`) is a different subscriber defect.
   
   ---
   _Identified during the 2026-08-02 deep re-scan; full list in 
[`docs/scan2-2026-08-02/06-medium-tiers.md`](docs/scan2-2026-08-02/06-medium-tiers.md)._


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to