Aias00 opened a new issue, #7704: URL: https://github.com/apache/shenyu/issues/7704
### Current behavior When `ShenyuNameResolver.Resolve.resolveInternal()` detects no address changes, it returns `Collections.emptyList()`. The `finally` block in `run()` then stores that empty list as the resolver's remembered `instanceList`. The next identical notification is compared against an empty remembered list and emits an unnecessary `ResolutionResult`. ### Location / reachable path - [ShenyuNameResolver.java:145–150,166–168](https://github.com/apache/shenyu/blob/66d7d954ca37d651a5ad916f988a8081157a7ab4/shenyu-plugin/shenyu-plugin-proxy/shenyu-plugin-rpc/shenyu-plugin-grpc/src/main/java/org/apache/shenyu/plugin/grpc/resolver/ShenyuNameResolver.java#L145) - `ApplicationConfigCache.handlerUpstream()` updates its handle and notifies its watcher even for identical non-empty upstream lists. The watcher is the resolver registered by `start()`. ### Reproduction and validation A standalone Java probe compiled the current resolver source, configured one upstream, used a synchronous executor/listener and delivered two identical notifications through the actual `ApplicationConfigCache.handlerUpstream()` method: ```text INITIAL remembered=1 callbacks=1 IDENTICAL_1 remembered=0 callbacks=1 IDENTICAL_2 remembered=1 callbacks=2 ``` The first no-change notification clears state; the second emits another result. No upstream gRPC service was contacted. ### Impact / priority **P3 / Low; confirmed, high confidence.** Repeated identical configuration/discovery updates alternate between clearing remembered state and emitting needless resolver updates. This causes avoidable load-balancer reconciliation and logging. Actual connection disruption or measured latency regression is not established and is not claimed. ### Suggested fix Represent no-change separately from an actual empty upstream set. Keep the last resolved list on a no-op notification, or update `instanceList` only when a replacement resolution was performed. Preserve existing error and no-server semantics. ### Related existing work Searched gRPC/resolver historical issue titles, open PR titles and live ShenyuNameResolver queries. #6612 addresses blocking RPC execution; #6605 is upstream-handler deduplication; #4704 concerns admin selector/rule visibility. None covers no-change resolver state being cleared. ### Reviewed revision Apache ShenYu 2.7.2-SNAPSHOT, `master@66d7d954ca37d651a5ad916f988a8081157a7ab4`. This repository review excludes unit-test and CI issue categories. -- 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]
