You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shenyu.apache.org by "Aias00 (via GitHub)" <gi...@apache.org> on 2026/08/03 01:09:52 UTC

[I] [BUG] DiscoveryUpstreamServiceImpl.listAll NPE on null discoveryRel / selector / proxySelector [shenyu]

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

   - severity: Medium
   - files: `shenyu-admin/src/main/java/org/apache/shenyu/admin/service/impl/DiscoveryUpstreamServiceImpl.java:149-170`
   - description: For each discovery handler, `discoveryRelMapper.selectByDiscoveryHandlerId(d.getId())` is dereferenced immediately at line 154 (`discoveryRelDO.getPluginName()`) and 155 (`discoveryRelDO.getSelectorId()`). If a handler has no rel row, this is an NPE. `selectorMapper.selectById(selectorId)` (158) and `proxySelectorMapper.selectById(proxySelectorId)` (163) are also dereferenced without null checks.
   - impact: A single orphan discovery-handler/rel or stale selector-id throws NPE and breaks the whole `listAll` sync (used by `SyncDataServiceImpl.syncAll`).
   - suggested_fix: Null-check `discoveryRelDO`, `selectorDO`, and `proxySelectorDO` and skip/log.
   - confidence: Medium
   - related_existing: #6586 covers the N+1 query pattern in this method; these NPE derefs are a distinct defect in the same method.
   
   ---
   _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: notifications-unsubscribe@shenyu.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [BUG] DiscoveryUpstreamServiceImpl.listAll NPE on null discoveryRel / selector / proxySelector [shenyu]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #6699:
URL: https://github.com/apache/shenyu/issues/6699#issuecomment-5161303305

   👋 Hello @yuluo-yx
   
   A new issue has been opened by @Aias00:
   - **Title**: [BUG] DiscoveryUpstreamServiceImpl.listAll NPE on null discoveryRel / selector / proxySelector
   - **Link**: https://github.com/apache/shenyu/issues/6699
   
   Please review when you have time. Thank you! 🙏


-- 
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: notifications-unsubscribe@shenyu.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [BUG] DiscoveryUpstreamServiceImpl.listAll NPE on null discoveryRel / selector / proxySelector [shenyu]

Posted by "Aias00 (via GitHub)" <gi...@apache.org>.
Aias00 closed issue #6699: [BUG] DiscoveryUpstreamServiceImpl.listAll NPE on null discoveryRel / selector / proxySelector
URL: https://github.com/apache/shenyu/issues/6699


-- 
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: notifications-unsubscribe@shenyu.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org