Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id BD4D2200BCC for ; Tue, 29 Nov 2016 22:23:07 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id BC2CA160B15; Tue, 29 Nov 2016 21:23:07 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 11E7B160AFC for ; Tue, 29 Nov 2016 22:23:06 +0100 (CET) Received: (qmail 79148 invoked by uid 500); 29 Nov 2016 21:23:06 -0000 Mailing-List: contact issues-help@geode.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@geode.apache.org Delivered-To: mailing list issues@geode.apache.org Received: (qmail 79139 invoked by uid 99); 29 Nov 2016 21:23:06 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Nov 2016 21:23:06 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id C1943C187E for ; Tue, 29 Nov 2016 21:23:05 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -6.219 X-Spam-Level: X-Spam-Status: No, score=-6.219 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-2.999] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id B0Z3CAspR4UH for ; Tue, 29 Nov 2016 21:23:01 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with SMTP id E99E75F5FD for ; Tue, 29 Nov 2016 21:22:59 +0000 (UTC) Received: (qmail 78870 invoked by uid 99); 29 Nov 2016 21:22:59 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Nov 2016 21:22:59 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id E0D3C2C03E3 for ; Tue, 29 Nov 2016 21:22:58 +0000 (UTC) Date: Tue, 29 Nov 2016 21:22:58 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: issues@geode.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (GEODE-1653) Executing a fire-and-forget function on all servers doesn't actually execute on all servers MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 29 Nov 2016 21:23:07 -0000 [ https://issues.apache.org/jira/browse/GEODE-1653?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15706567#comment-15706567 ] ASF GitHub Bot commented on GEODE-1653: --------------------------------------- Github user jhuynh1 commented on a diff in the pull request: https://github.com/apache/incubator-geode/pull/293#discussion_r90116715 --- Diff: geode-core/src/test/java/org/apache/geode/internal/cache/FireAndForgetFunctionOnAllServersDUnitTest.java --- @@ -0,0 +1,164 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more contributor license + * agreements. See the NOTICE file distributed with this work for additional information regarding + * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the License. You may obtain a + * copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package org.apache.geode.internal.cache; + +import org.apache.geode.cache.Region; +import org.apache.geode.cache.client.*; +import org.apache.geode.cache.client.internal.LocatorTestBase; +import org.apache.geode.cache.execute.Execution; +import org.apache.geode.cache.execute.Function; +import org.apache.geode.cache.execute.FunctionService; +import org.apache.geode.internal.AvailablePort; +import org.apache.geode.internal.cache.functions.TestFunction; +import org.apache.geode.test.dunit.Assert; +import org.apache.geode.test.dunit.Host; +import org.apache.geode.test.dunit.NetworkUtils; +import org.apache.geode.test.dunit.VM; +import org.apache.geode.test.junit.categories.DistributedTest; +import org.junit.Test; +import org.junit.experimental.categories.Category; + +import static com.jayway.awaitility.Awaitility.*; +import static java.util.concurrent.TimeUnit.*; + +/** + * Created by amey on 22/11/16. --- End diff -- Minor nitpick, would you be able to remove the author tags? > 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 getAllServers(PoolImpl pool) { > List 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)