Aias00 commented on code in PR #7747:
URL: https://github.com/apache/shenyu/pull/7747#discussion_r4303401711
##########
shenyu-plugin/shenyu-plugin-proxy/shenyu-plugin-rpc/shenyu-plugin-grpc/src/main/java/org/apache/shenyu/plugin/grpc/resolver/ShenyuNameResolver.java:
##########
@@ -165,7 +165,7 @@ private List<GrpcUpstream> resolveInternal() {
if (!needsToUpdateConnections(grpcUpstreamList)) {
LOG.info("Nothing has changed... skipping update for {}",
name);
- return Collections.emptyList();
+ return this.savedInstanceList;
Review Comment:
Worth a one-line comment here: `Resolve.run()` stores whatever this method
returns as the new `instanceList`, so the no-change branch must hand back the
previous snapshot — returning `emptyList()` made every following comparison
believe the list had changed. Without the comment this is easy to "simplify"
back.
--
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]