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 405C5200B61 for ; Tue, 9 Aug 2016 23:57:22 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 3F0D4160AA5; Tue, 9 Aug 2016 21:57:22 +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 AA438160A6B for ; Tue, 9 Aug 2016 23:57:21 +0200 (CEST) Received: (qmail 26176 invoked by uid 500); 9 Aug 2016 21:57:20 -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 26165 invoked by uid 99); 9 Aug 2016 21:57:20 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Aug 2016 21:57:20 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 6D06D2C0003 for ; Tue, 9 Aug 2016 21:57:20 +0000 (UTC) Date: Tue, 9 Aug 2016 21:57:20 +0000 (UTC) From: "Cameron McKenzie (JIRA)" To: dev@curator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CURATOR-341) create().orSetData() retries indefinitely if node exists MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 09 Aug 2016 21:57:22 -0000 [ https://issues.apache.org/jira/browse/CURATOR-341?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15414306#comment-15414306 ] Cameron McKenzie commented on CURATOR-341: ------------------------------------------ Your assessment looks correct to me. Would you like to provide a PR with a unit test and a fix? If not, I will fix it when I get a minute. > create().orSetData() retries indefinitely if node exists > -------------------------------------------------------- > > Key: CURATOR-341 > URL: https://issues.apache.org/jira/browse/CURATOR-341 > Project: Apache Curator > Issue Type: Bug > Components: Framework > Affects Versions: 3.0.0 > Reporter: Henrik Nordvik > > Symptom: > One call to create.orSetData().inBackground(callback) writes the data to zookeeper infinitely many times. Version numbers in stat increase quickly. Callback is also called multiple times. > Added the following to TestFramework.testCreateOrSetData() to make it fail: > {code} > CuratorEvent event2 = queue.poll(new Timing().milliseconds(), TimeUnit.MILLISECONDS); > Assert.assertNull(event2); > {code} > (slows down test, but just to demonstrate it) > Seems like CreateBuilderImpl.backgroundSetData() shouldn't requeue mainOperation after doing setData. > {code} > client.queueOperation(mainOperationAndData); > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)