You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@geode.apache.org by GitBox <gi...@apache.org> on 2021/02/03 22:28:28 UTC

[GitHub] [geode] boglesby commented on a change in pull request #6000: GEODE-8890: Catch ClassCastException in LocatorDiscovery.java

boglesby commented on a change in pull request #6000:
URL: https://github.com/apache/geode/pull/6000#discussion_r569796598



##########
File path: geode-wan/src/main/java/org/apache/geode/cache/client/internal/locator/wan/LocatorDiscovery.java
##########
@@ -133,75 +154,69 @@ public void run() {
   }
 
   private WanLocatorDiscoverer getDiscoverer() {
-    return this.discoverer;
+    return discoverer;
   }
 
   private void exchangeLocalLocators() {
     int retryAttempt = 1;
     while (!getDiscoverer().isStopped()) {
       try {
-        RemoteLocatorJoinResponse response =
-            (RemoteLocatorJoinResponse) locatorClient.requestToServer(locatorId.getHost(),
-                request, WanLocatorDiscoverer.WAN_LOCATOR_CONNECTION_TIMEOUT, true);
+        RemoteLocatorJoinResponse response = (RemoteLocatorJoinResponse) locatorClient
+            .requestToServer(locatorId.getHost(), request, WAN_LOCATOR_CONNECTION_TIMEOUT, true);
         if (response != null) {
-          LocatorHelper.addExchangedLocators(response.getLocators(), this.locatorListener);
+          addExchangedLocators(response);
           logger.info("Locator discovery task exchanged locator information {} with {}: {}.",

Review comment:
       While you're changing this method, can you change this this log message a bit?
   
   Currently it looks like:
   ```
   Locator discovery task exchanged locator information 10.212.3.135[10332] with localhost[10331]: {1=[10.212.3.135[10331]], 2=[10.212.3.135[10332]]}.
   ```
   It would make more sense with something like:
   ```
   Locator discovery task for locator 10.212.3.135[10332] exchanged locator information with localhost[10331]: {1=[10.212.3.135[10331]], 2=[10.212.3.135[10332]]}.
   ```




----------------------------------------------------------------
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:
users@infra.apache.org