[
https://issues.apache.org/jira/browse/CURATOR-341?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15416987#comment-15416987
]
ASF GitHub Bot commented on CURATOR-341:
----------------------------------------
GitHub user henrikno opened a pull request:
https://github.com/apache/curator/pull/160
CURATOR-341: Don't retry create operation after setData
Resulted in infinite amount of retries
https://issues.apache.org/jira/browse/CURATOR-341
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/henrikno/curator CURATOR-3.0
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/curator/pull/160.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #160
----
commit 0113c6cbad8b057d6245c2d711bd1650e96d79c4
Author: Henrik Nordvik <[email protected]>
Date: 2016-08-11T10:17:02Z
CURATOR-341: Don't retry create operation after setData
Resulted in infinite amount of retries
----
> 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)