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

   ## Description
   Line 75: `if (!dubboEnabled || !sofaEnabled)` calls `contextPathParse` 
whenever at least one of dubbo/sofa is disabled. Since dubbo and sofa are 
mutually exclusive (the if/else chain on lines 78–93 picks at most one), this 
condition is true for **every** ingress — including dubbo-only and sofa-only 
ingresses. The intent is `!dubboEnabled && !sofaEnabled` (run 
`contextPathParse` only when neither RPC plugin is enabled, i.e. for HTTP-based 
plugins). With `||`, `contextPathParse` runs for dubbo/sofa ingresses, adding a 
`ContextPathParser` `ShenyuMemoryConfig` alongside the 
`DubboIngressParser`/`SofaParser` one, creating duplicate context-path 
selectors.
   
   ## Location
   - 
`shenyu-kubernetes-controller/src/main/java/org/apache/shenyu/k8s/parser/IngressParser.java:75`
   
   ## Impact
   Dubbo/Sofa ingresses get spurious context-path-plugin selectors with 
null/`"null/**"` rule conditions (see M-11), polluting the selector cache and 
potentially causing routing ambiguity.
   
   ## Suggested fix
   Change `||` to `&&`.
   
   ## Related existing
   None — GOV-T6 (#6679) covers parser zero-tests; this is a logic operator 
defect.
   


-- 
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