Aias00 opened a new issue, #7437: URL: https://github.com/apache/shenyu/issues/7437
## Is there an existing issue for this? - [x] I searched existing open and closed issues. ## Current Behavior Updating Apache Dubbo plugin configuration can invalidate and rebuild service references while retaining stale effective registry and consumer settings. `AbstractDubboPluginDataHandler` detects changed `DubboRegisterConfig` values, including registry `group` and consumer pool fields, and calls the Apache Dubbo handler. The handler calls `ApacheDubboConfigCache.init()` before `invalidateAll()`. However, `needUpdateRegistryConfig()` only compares registry protocol/address, so a group-only update keeps the old `RegistryConfig.group`. Consumer configuration is initialized only when `consumerConfig` is null, so subsequent threadpool/corethreads/threads/queues changes are not copied into it. ## Expected Behavior Apply all supported changed plugin configuration fields to the effective registry/consumer configuration before rebuilding references. ## Steps To Reproduce 1. Initialize `ApacheDubboConfigCache` with the same valid registry address/protocol and group `g1`. 2. Initialize it again with group `g2`, retaining the address/protocol. 3. Inspect `registryConfig.getGroup()`; it still reports `g1`. 4. Repeat with a changed consumer pool field; the existing `ConsumerConfig` retains its original value. Through Admin, the equivalent plugin update reaches `init()` and invalidates references, but references rebuilt afterward still consume the old effective configuration. ## Environment ShenYu `2.7.2-SNAPSHOT`, `master` at `67596c1d228b62da75cd0a0ecb47d0ac5d995384`, Apache Dubbo plugin with runtime configuration updates. ## Location And Impact - [AbstractDubboPluginDataHandler.java:63](https://github.com/apache/shenyu/blob/67596c1d228b62da75cd0a0ecb47d0ac5d995384/shenyu-plugin/shenyu-plugin-proxy/shenyu-plugin-rpc/shenyu-plugin-dubbo/shenyu-plugin-dubbo-common/src/main/java/org/apache/shenyu/plugin/dubbo/common/handler/AbstractDubboPluginDataHandler.java#L63): accepts updated config. - [ApacheDubboPluginDataHandler.java:33](https://github.com/apache/shenyu/blob/67596c1d228b62da75cd0a0ecb47d0ac5d995384/shenyu-plugin/shenyu-plugin-proxy/shenyu-plugin-rpc/shenyu-plugin-dubbo/shenyu-plugin-apache-dubbo/src/main/java/org/apache/shenyu/plugin/apache/dubbo/handler/ApacheDubboPluginDataHandler.java#L33): initializes configuration then invalidates references. - [ApacheDubboConfigCache.java:179](https://github.com/apache/shenyu/blob/67596c1d228b62da75cd0a0ecb47d0ac5d995384/shenyu-plugin/shenyu-plugin-proxy/shenyu-plugin-rpc/shenyu-plugin-dubbo/shenyu-plugin-apache-dubbo/src/main/java/org/apache/shenyu/plugin/apache/dubbo/cache/ApacheDubboConfigCache.java#L179): comparison omits group. - [ApacheDubboConfigCache.java:165](https://github.com/apache/shenyu/blob/67596c1d228b62da75cd0a0ecb47d0ac5d995384/shenyu-plugin/shenyu-plugin-proxy/shenyu-plugin-rpc/shenyu-plugin-dubbo/shenyu-plugin-apache-dubbo/src/main/java/org/apache/shenyu/plugin/apache/dubbo/cache/ApacheDubboConfigCache.java#L165): consumer fields are copied only once. Severity: Medium. Confidence: high. An operator's group change can appear accepted while newly built references keep using the old registry group. Pool tuning changes similarly fail to take effect. ## Suggested Fix And Regression Coverage Include every effective registry field in update decisions and refresh changed consumer fields before reference invalidation. Preserve intentional defaults when fields are removed from configuration. Test group-only changes, consumer-field changes, clearing optional fields, and unchanged-config reuse. ## Related Existing Issues #6516/#7425 concern namespace rewrites corrupting registry addresses, not stale effective plugin configuration after an Admin update. No matching group/pool update issue was found in the baseline or targeted open/closed searches. The reported configuration path was traced through actual handlers and reference consumers; no live Dubbo registry integration deployment was run. An independent verifier confirmed operator configuration reachability and consumption of the stale registry/consumer objects by rebuilt references. Existing `ApacheDubboConfigCacheTest,ApacheDubboPluginDataHandlerTest,ApacheDubboGrayLoadBalanceTest` passed 23 tests with zero failures, but do not assert these dynamic configuration updates. -- 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]
