Aias00 opened a new issue, #6546: URL: https://github.com/apache/shenyu/issues/6546
## Description Within a selector group (grouped by `contextPath` or `appName` in `buildData`), the URIs are split only by `EventType`. For each resulting list, the code picks **one** namespace via `findFirst()`: `register.stream().map(URIRegisterDTO::getNamespaceId).filter(...isNotBlank).findFirst().ifPresent(namespaceId -> service.registerURI(selectorName, register, namespaceId))`. Every URI in `register` is then registered under that single namespaceId, ignoring each DTO's own `namespaceId`. The same pattern is used for `heartbeat` and `offline`. ## Location ``` shenyu-admin/.../disruptor/subscriber/URIRegisterExecutorSubscriber.java:88-105 ``` ## Impact Two namespaces share the same `contextPath`/`appName` and a published batch contains URIs from both namespaces -> cross-namespace URI mis-registration: URIs belonging to namespace B are recorded under namespace A, leading to routing/selectors being created in the wrong namespace. `offline` is especially dangerous — taking a backend offline in the wrong namespace while leaving it "online" in the correct one. `RegisterServerConsumerExecutor.isValidData` only checks that each URI's `namespaceId` is non-blank — it does not enforce uniformity. ## Suggested fix Sub-group by `namespaceId` before dispatching: `uriList.stream().collect(Collectors.groupingBy(URIRegisterDTO::getNamespaceId))` and call `service.registerURI/heartbeat/offline` once per `(namespaceId, subList)`. ## 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)._ -- 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]
