geode-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (GEODE-1653) Executing a fire-and-forget function on all servers doesn't actually execute on all servers
Date Wed, 30 Nov 2016 06:01:58 GMT

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

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

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

    https://github.com/apache/incubator-geode/pull/293#discussion_r90173276
  
    --- Diff: geode-core/src/main/java/org/apache/geode/cache/client/internal/ExecuteFunctionNoAckOp.java
---
    @@ -236,4 +236,16 @@ protected Message createResponseMessage() {
         }
       }
     
    +  private static List<ServerLocation> getAllServers(PoolImpl pool) {
    +    List<ServerLocation> servers;
    +    if (pool.getLocators() == null || pool.getLocators().isEmpty()) {
    +      servers = ((ExplicitConnectionSourceImpl) pool.getConnectionSource()).getAllServers();
    --- End diff --
    
    This can be done by introducing a getAllServers() into DataSource interface and modify
the AutoConnectionSourceImpl.findAllServers() into getAllServers(). 
    
    Also there's no need to create a static method in ExecuteFunctionNoAckOp.java. Also need
to modify ExecuteFunctionOp.java to use ArrayList<ServerLocation> servers = pool.getConnectionSource().getAllServers();



> Executing a fire-and-forget function on all servers doesn't actually execute on all servers
> -------------------------------------------------------------------------------------------
>
>                 Key: GEODE-1653
>                 URL: https://issues.apache.org/jira/browse/GEODE-1653
>             Project: Geode
>          Issue Type: Bug
>          Components: functions
>            Reporter: Barry Oglesby
>            Assignee: Amey Barve
>
> Executing a fire-and-forget function on all servers only executes on the ones the client
is currently connected to.
> The two {{ExecuteFunctionNoAckOp execute}} methods get the servers to execute against
using code like:
> {noformat}
> pool.getCurrentServers();
> {noformat}
> This method just gets all the {{EndpointManager's endpointMap's ServerLocations}}.
> What should be done is more like what the {{ExecuteFunctionOp execute}} methods do:
> {noformat}
> private static List<ServerLocation> getAllServers(PoolImpl pool) {
>   List<ServerLocation> servers = null;
>   if (pool.getLocators() == null || pool.getLocators().isEmpty()) {
>     servers = ((ExplicitConnectionSourceImpl) pool.getConnectionSource()).getAllServers();
>   } else {
>     servers = ((AutoConnectionSourceImpl) pool.getConnectionSource()).findAllServers();
// n/w call on locator
>   }
>   return servers;
> }
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message