[
https://issues.apache.org/jira/browse/CURATOR-431?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16163272#comment-16163272
]
ASF GitHub Bot commented on CURATOR-431:
----------------------------------------
Github user Randgalt commented on a diff in the pull request:
https://github.com/apache/curator/pull/236#discussion_r138405955
--- Diff:
curator-framework/src/main/java/org/apache/curator/framework/imps/CreateBuilderImpl.java
---
@@ -1212,7 +1212,21 @@ public String call() throws Exception
{
if ( setDataIfExists )
{
- client.getZooKeeper().setData(path,
data, setDataIfExistsVersion);
+ Stat setStat =
client.getZooKeeper().setData(path, data, setDataIfExistsVersion);
+ if(storingStat != null)
+ {
+
storingStat.setAversion(setStat.getAversion());
--- End diff --
Other than that LGTM
> Stat structure not filled when using the idiom create().orSetData()
> -------------------------------------------------------------------
>
> Key: CURATOR-431
> URL: https://issues.apache.org/jira/browse/CURATOR-431
> Project: Apache Curator
> Issue Type: Bug
> Components: Client
> Affects Versions: 4.0.0
> Reporter: Andrés Pipicello
> Assignee: Cameron McKenzie
> Attachments: CreateOrSetDataTest.java
>
>
> Hello
> It seems that when using the idiom {{client.create().orSetData()}}, the Stat
> structure set with {{storingStatIn}} does not get filled if the path already
> exists.
> I attached a unit test that exemplifies the behaviour.
> Regards
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)