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 17FE6200B4C for ; Fri, 22 Jul 2016 19:58:00 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 1680F160A6D; Fri, 22 Jul 2016 17:58:00 +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 15887160A5A for ; Fri, 22 Jul 2016 19:57:58 +0200 (CEST) Received: (qmail 56825 invoked by uid 500); 22 Jul 2016 17:57:58 -0000 Mailing-List: contact user-help@curator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@curator.apache.org Delivered-To: mailing list user@curator.apache.org Received: (qmail 56813 invoked by uid 99); 22 Jul 2016 17:57:58 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 Jul 2016 17:57:58 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id CE1D2C0B9A for ; Fri, 22 Jul 2016 17:57:57 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.179 X-Spam-Level: ** X-Spam-Status: No, score=2.179 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_REPLY=1, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id IHu1rgHQhg9O for ; Fri, 22 Jul 2016 17:57:55 +0000 (UTC) Received: from mail-oi0-f49.google.com (mail-oi0-f49.google.com [209.85.218.49]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 7B2095FDFB for ; Fri, 22 Jul 2016 17:57:48 +0000 (UTC) Received: by mail-oi0-f49.google.com with SMTP id j185so173220291oih.0 for ; Fri, 22 Jul 2016 10:57:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=dD9NqLdiBiS1e6z4cLmnns6yHNHEH605cPSwPZdZBL8=; b=d5qtR08ft8JLCwAP1f6PiZcJwojuQOnm2mjcJLnrW6s6n8LM9PCOzEkL0J3xd/f9gj urM++p7LgflioxUs+/EXymU+xf3qPQBne9NpojNpIVFqhmYQsDCqk3np4r30eBp1yZRP Bt1IDzhPRTqinJ4Z2cLGkjm/XkB0VXJmgzP7P7FMv1dkjE3j9mFRP9O9AmXLpDSpAoHO lXNFcQGU/SNug1lB0Ze1k+jVvfLgcWZRn7BVwTYXJ64amqmPcjl0lhalgwYZ/o3TMJOp 49xOpp36faHEB8VtsSotsHXPKXraWENu1jwysB5evCDDl0VTUUYFMFlTmxqHTrmTRtaM lHQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=dD9NqLdiBiS1e6z4cLmnns6yHNHEH605cPSwPZdZBL8=; b=KtkFgBKnjFHzUjptqsQu93aFNMLJyczpt44+ocnmh9Nz8eqr1ox32qnAmZxrI148rj RGKFrM+WkbhRmPW+xMLCz9aLsKEZkIso3yIsdTjwJeBTsLSczzdp6iiA/2Aqw23PCrpt 1ncrOC9nYh/nDpvZ9RguCb6fHpoZaLf64E2ML/C5g6T80m2ZxsIwzPVwlD54ci3zgT6+ fmMByzfggc3UyoR0dwlikF8hFdjdT7v0DIvxfemOo9AbCETLa7TMivP1aqdfeQrRbE5e /AaLc8EJ1De469i8YEmaTb1YhZ5l33YeNE2BvRugKfWI0L8uBe+V4pWJPOxpgf1iZbQ8 gTuw== X-Gm-Message-State: AEkooutiiNP5NGzjno78IE2q+ETLfsSJ6q3xeM3NSniEaQ7q+P2iSIQF+ae2sxk1n7kDWnfEkB3WeZQQrkVXbg== X-Received: by 10.157.32.120 with SMTP id n111mr2887172ota.120.1469210267150; Fri, 22 Jul 2016 10:57:47 -0700 (PDT) MIME-Version: 1.0 Received: by 10.157.40.196 with HTTP; Fri, 22 Jul 2016 10:57:46 -0700 (PDT) In-Reply-To: References: <3BC2AC20-1A86-4EC3-9B17-FF0293E15B8F@jordanzimmerman.com> <7C4846B8-C422-4246-A37D-2EDEFDD2CF8B@jordanzimmerman.com> From: Scott Blum Date: Fri, 22 Jul 2016 13:57:46 -0400 Message-ID: Subject: Re: PathChildrenCache creates the node if not present To: Alvaro Gareppe Cc: user@curator.apache.org, cammckenzie@apache.org Content-Type: multipart/alternative; boundary=001a113e379212f39005383d2cdb archived-at: Fri, 22 Jul 2016 17:58:00 -0000 --001a113e379212f39005383d2cdb Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable I just pushed it to master so it should make any future 2.X or 3.X releases= . On Fri, Jul 22, 2016 at 8:48 AM, Alvaro Gareppe wrote: > Scott, Jordan, > What version will include this fix? So I can track it and do the > upgraded when released. > > Thank you very much for your help and quick answer guys! > > On Thu, Jul 21, 2016 at 7:22 PM, Scott Blum wrote= : > >> Okay, I pushed a commit to just drop TreeCache's use of >> CloseableExecutorService entirely. I am hoping clients don't really nee= d >> this... I can't imagine what you'd use it for. >> >> On Thu, Jul 21, 2016 at 5:39 PM, Jordan Zimmerman < >> jordan@jordanzimmerman.com> wrote: >> >>> OK with me. Just make sure that setExecutor(ExecutorService >>> executorService) works correctly. But, I=E2=80=99m concerned there=E2= =80=99s a bug >>> in CloseableExecutorService. I=E2=80=99d like to see it fixed if there = is one. >>> >>> -Jordan >>> >>> On Jul 21, 2016, at 4:38 PM, Scott Blum wrote: >>> >>> In that case, I have no idea why TreeCache would use >>> CloseableExecutorService at all, it's a pointless (and in fact, >>> destructive) wrapper at this point. How about I just eliminate it? >>> >>> On Thu, Jul 21, 2016 at 5:31 PM, Jordan Zimmerman < >>> jordan@jordanzimmerman.com> wrote: >>> >>>> I forget now who wrote CloseableExecutorService. As I recall, the >>>> desire was to be able to have an object that looks like an ExecutorSer= vice >>>> but could handle an externally managed ExecutorService or an internall= y >>>> managed one. This way, the code could always treat it as internally ma= naged >>>> - being able to call shutdownNow, etc. - but if it was provided by a c= lient >>>> it would only close threads actually used by the instnace. >>>> >>>> -Jordan >>>> >>>> >>>> On Jul 21, 2016, at 4:28 PM, Scott Blum wrote: >>>> >>>> Looks like a real bug... for some reason, the single-arg constructor >>>> for CloseableExecutorService defaults to NOT actually shutting down th= e >>>> underlying executor. This makes absolutely no sense to me, but it's t= he >>>> source of the bug... most of the code paths to construct a TreeCache u= se >>>> the 1-arg constructor. Only one of them uses the 2-arg constructor wi= th >>>> the right setting. >>>> >>>> I have to admit, the design of CloseableExecutorService is kind of >>>> WTF-inducing for me... >>>> >>>> On Thu, Jul 21, 2016 at 5:18 PM, Jordan Zimmerman < >>>> jordan@jordanzimmerman.com> wrote: >>>> >>>>> Please open an issue in Jira if this is a real bug. >>>>> >>>>> > On Jul 21, 2016, at 4:16 PM, Scott Blum >>>>> wrote: >>>>> > >>>>> > Okay, now I can repro it; the difference was you adding the loop to >>>>> wait for the thread to start up. >>>>> >>>>> >>>> >>>> >>> >>> >> > > > -- > Ing. Alvaro Gareppe > agareppe@gmail.com > --001a113e379212f39005383d2cdb Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I just pushed it to master so it should make any future 2.= X or 3.X releases.

On Fri, Jul 22, 2016 at 8:48 AM, Alvaro Gareppe &l= t;agareppe@gmail.co= m> wrote:
= Scott, Jordan,=C2=A0
=C2=A0 =C2=A0 What version will include this fix? = So I can track it and do the upgraded when released.

Thank you very much for your help and quick answer guys!

On Thu, Jul 21, 2016 at 7:22 PM, Scott Blum <dragonsinth@gmail.com> wrote:
Oka= y, I pushed a commit to just drop TreeCache's use of CloseableExecutorS= ervice entirely.=C2=A0 I am hoping clients don't really need this... I = can't imagine what you'd use it for.

On Thu, Jul 21, 2016 at 5:39 PM,= Jordan Zimmerman <jordan@jordanzimmerman.com> wrot= e:
OK= with me. Just make sure that=C2=A0setExecutor(ExecutorService executorServ= ice) works correctly. But, I=E2=80=99m concerned there=E2=80=99s a bug in= =C2=A0CloseableExecutorService. I=E2=80=99d like to see it fixed if there i= s one.

-Jordan

On Jul 21, 2= 016, at 4:38 PM, Scott Blum <dragonsinth@gmail.com> wrote:

In that case, I have no idea why TreeCache would use CloseableExec= utorService at all, it's a pointless (and in fact, destructive) wrapper= at this point.=C2=A0 How about I just eliminate it?

On Thu, Jul 21, 2016 at 5:31 PM, J= ordan Zimmerman <jordan@jordanzimmerman.com> wrote:=
I fo= rget now who wrote=C2=A0CloseableExecutorService. As I recall, the desire w= as to be able to have an object that looks like an ExecutorService but coul= d handle an externally managed ExecutorService or an internally managed one= . This way, the code could always treat it as internally managed - being ab= le to call shutdownNow, etc. - but if it was provided by a client it would = only close threads actually used by the instnace.

-Jordan=


On= Jul 21, 2016, at 4:28 PM, Scott Blum <dragonsinth@gmail.com> wrote:

Looks like a real bug... for some reason, the single-arg= constructor for=C2=A0CloseableExecutorService defaults to=C2=A0NOT actuall= y shutting down the underlying executor.=C2=A0 This makes absolutely no sen= se to me, but it's the source of the bug... most of the code paths to c= onstruct a TreeCache use the 1-arg constructor.=C2=A0 Only one of them uses= the 2-arg constructor with the right setting.

I have to= admit, the design of CloseableExecutorService is kind of WTF-inducing for = me...

On Thu, Jul= 21, 2016 at 5:18 PM, Jordan Zimmerman <jordan@jordanzimmerman.co= m> wrote:
Please open an is= sue in Jira if this is a real bug.

> On Jul 21, 2016, at 4:16 PM, Scott Blum <dragonsinth@gmail.com> wrote:
>
> Okay, now I can repro it; the difference was you adding the loop to wa= it for the thread to start up.








<= /div>--
Ing. A= lvaro Gareppe
ag= areppe@gmail.com

--001a113e379212f39005383d2cdb--