[ https://issues.apache.org/jira/browse/GEODE-3406?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16130900#comment-16130900 ]
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_r133780406 --- 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 -- why 'servers2'? What does the numeric denote? Maybe a different descriptive variable name is required... like 'availableServers' > 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)