kezhenxu94 commented on a change in pull request #3170: Support upgrade backend 
w/o rebooting agents
URL: https://github.com/apache/skywalking/pull/3170#discussion_r307966030
 
 

 ##########
 File path: 
apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/remote/GRPCChannelManager.java
 ##########
 @@ -88,24 +88,22 @@ public void run() {
                 String server = "";
                 try {
                     int index = Math.abs(random.nextInt()) % 
grpcServers.size();
-                    if (index != selectedIdx) {
-                        selectedIdx = index;
+                    selectedIdx = index;
 
 Review comment:
   Thanks for clarifying this, I try another way to avoid recreating a new 
channel every time (take the advantage of GRPC's auto-reconnectivity) when 
there is only one server, by checking the existed channel's state. 

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to