[ 
https://issues.apache.org/jira/browse/GEODE-3406?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16130903#comment-16130903
 ] 

ASF GitHub Bot commented on GEODE-3406:
---------------------------------------

Github user kohlmu-pivotal commented on a diff in the pull request:

    https://github.com/apache/geode/pull/716#discussion_r133779835
  
    --- 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 think if a 'null' is passed into the 'getServers' method, it should at 
least be explained that currently the server group functionality is not 
supported. Then a TODO could be added or a ticket can be raised to make sure 
this is not missed when server groups are supported


> Enable new flow for protocol on locators
> ----------------------------------------
>
>                 Key: GEODE-3406
>                 URL: https://issues.apache.org/jira/browse/GEODE-3406
>             Project: Geode
>          Issue Type: Sub-task
>          Components: client/server
>            Reporter: Brian Baynes
>            Assignee: Alexander Murmann
>
> Enable magic byte and new flow for new protocol on locators.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to