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.
Description
Line 75:
if (!dubboEnabled || !sofaEnabled)callscontextPathParsewhenever 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(runcontextPathParseonly when neither RPC plugin is enabled, i.e. for HTTP-based plugins). With||,contextPathParseruns for dubbo/sofa ingresses, adding aContextPathParserShenyuMemoryConfigalongside theDubboIngressParser/SofaParserone, creating duplicate context-path selectors.Location
shenyu-kubernetes-controller/src/main/java/org/apache/shenyu/k8s/parser/IngressParser.java:75Impact
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.