Github user WireBaron commented on a diff in the pull request:

    https://github.com/apache/geode/pull/716#discussion_r133598920
  
    --- Diff: 
geode-protobuf/src/main/java/org/apache/geode/protocol/protobuf/operations/GetAvailableServersOperationHandler.java
 ---
    @@ -50,51 +37,19 @@
       @Override
       public Result<ServerAPI.GetAvailableServersResponse> process(
           SerializationService serializationService, 
ServerAPI.GetAvailableServersRequest request,
    -      Cache cache) {
    -
    -    InternalDistributedSystem distributedSystem =
    -        (InternalDistributedSystem) cache.getDistributedSystem();
    -    Properties properties = distributedSystem.getProperties();
    -    String locatorsString = 
properties.getProperty(ConfigurationProperties.LOCATORS);
    -
    -    HashSet<DistributionLocatorId> locators = new HashSet();
    -    StringTokenizer stringTokenizer = new StringTokenizer(locatorsString, 
",");
    -    while (stringTokenizer.hasMoreTokens()) {
    -      String locator = stringTokenizer.nextToken();
    -      if (StringUtils.isNotEmpty(locator)) {
    -        locators.add(new DistributionLocatorId(locator));
    -      }
    -    }
    +      ExecutionContext executionContext) throws 
InvalidExecutionContextException {
     
    -    TcpClient tcpClient = getTcpClient();
    -    for (DistributionLocatorId locator : locators) {
    -      try {
    -        return getGetAvailableServersFromLocator(tcpClient, 
locator.getHost());
    -      } catch (IOException | ClassNotFoundException e) {
    -        // try the next locator
    -      }
    -    }
    -    return Failure.of(ProtobufResponseUtilities.makeErrorResponse(
    -        ProtocolErrorCode.DATA_UNREACHABLE.codeValue, "Unable to find a 
locator"));
    -  }
    +    InternalLocator locator = executionContext.getLocator();
    +    ArrayList servers2 = 
locator.getServerLocatorAdvisee().getLoadSnapshot().getServers(null);
    --- End diff --
    
    I see we didn't fix up this inane variable name I added, can you take care 
of that.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to