Return-Path: X-Original-To: apmail-curator-dev-archive@minotaur.apache.org Delivered-To: apmail-curator-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9BD25182A5 for ; Tue, 13 Oct 2015 22:20:05 +0000 (UTC) Received: (qmail 25508 invoked by uid 500); 13 Oct 2015 22:20:05 -0000 Delivered-To: apmail-curator-dev-archive@curator.apache.org Received: (qmail 25454 invoked by uid 500); 13 Oct 2015 22:20:05 -0000 Mailing-List: contact dev-help@curator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@curator.apache.org Delivered-To: mailing list dev@curator.apache.org Received: (qmail 25441 invoked by uid 99); 13 Oct 2015 22:20:05 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Oct 2015 22:20:05 +0000 Date: Tue, 13 Oct 2015 22:20:05 +0000 (UTC) From: "Cameron McKenzie (JIRA)" To: dev@curator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Assigned] (CURATOR-271) Curator does not run sync callback on supplied Executor MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CURATOR-271?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Cameron McKenzie reassigned CURATOR-271: ---------------------------------------- Assignee: Cameron McKenzie > Curator does not run sync callback on supplied Executor > ------------------------------------------------------- > > Key: CURATOR-271 > URL: https://issues.apache.org/jira/browse/CURATOR-271 > Project: Apache Curator > Issue Type: Bug > Components: Framework > Reporter: Glen Wallace > Assignee: Cameron McKenzie > > It appears that Apache Curator does not execute the sync callback on the supplied Executor in at least one case. > This issue described is currently (2015-10-14) present in master > Sample code outline: > {code:java} > BackgroundCallback myCallback = ...; > Executor myExecutor = ...; > String myZkPath = ...; > CuratorFramework myCurator = ...; > curator.sync() > .inBackground(myCallback, myExecutor) > .forPath(myZkPath); > {code} > This should execute {{myCallback}} on the {{myExecutor}} executor, it does not and instead executes {{myCallback}} on what is presumeably a ZooKeeper thread. > Looking at the {{org.apache.curator.framework.imps.SyncBuilderImpl}} code we have > {code:java} > public Pathable inBackground(BackgroundCallback callback, Executor executor) { > backgrounding = new Backgrounding(callback, executor); > return this; > } > {code} > However the only matching constructor in {{org.apache.curator.framework.imps.Backgrounding}} is {{Backgrounding(BackgroundCallback callback, Object context)}} > It seems that {{SyncBuilderImpl#inBackground(BackgroundCallback,Executor)}} should be using the following Backgrounding constructor {{Backgrounding(CuratorFrameworkImpl, BackgroundCallback, Executor)}} > A workaround looks to be using the following method and passing a null context object: > {code:java} > public Pathable inBackground(BackgroundCallback callback, Object context, Executor executor) > {code} > A very quick skim suggests that it is only {{SyncBuilderImpl}} that has the issue the other {{org.apache.curator.framework.imps.*BuilderImpl}} classes seem to be fine. -- This message was sent by Atlassian JIRA (v6.3.4#6332)