<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 19:53:25 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>OpenDaylight JIRA</title>
    <link>https://jira.opendaylight.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>8.20.10</version>
        <build-number>820010</build-number>
        <build-date>22-06-2022</build-date>
    </build-info>


<item>
            <title>[CONTROLLER-592] Always get ConflictingModificationException when writing</title>
                <link>https://jira.opendaylight.org/browse/CONTROLLER-592</link>
                <project id="10113" key="CONTROLLER">controller</project>
                    <description>&lt;p&gt;I&apos;m trying to write to the operational store from an RPC method.  The problem is that even though there&apos;s only one write happening anywhere and no deletes, nonetheless I always get back:&lt;/p&gt;

&lt;p&gt;org.opendaylight.controller.sal.restconf.impl.RestconfDocumentedException: errors: [error-type: application, error-tag: operation-failed, error-message: The operation encountered an unexpected error while executing.error-info: org.opendaylight.yangtools.yang.data.api.schema.tree.ConflictingModificationAppliedException: Node was deleted by other transaction.&lt;/p&gt;

&lt;p&gt;A slightly simplified version of the code is below.  This was working with the old API.&lt;/p&gt;

&lt;p&gt;Function&amp;lt;RpcResult&amp;lt;TransactionStatus&amp;gt;, RpcResult&amp;lt;Void&amp;gt;&amp;gt; futureTrans =&lt;br/&gt;
        new Function&amp;lt;RpcResult&amp;lt;TransactionStatus&amp;gt;,RpcResult&amp;lt;Void&amp;gt;&amp;gt;() {&lt;br/&gt;
    @Override&lt;br/&gt;
    public RpcResult&amp;lt;Void&amp;gt; apply(RpcResult&amp;lt;TransactionStatus&amp;gt; input) &lt;/p&gt;
{
        return Rpcs.&amp;lt;Void&amp;gt;getRpcResult(input.isSuccessful(), 
                                       input.getErrors());
    }
&lt;p&gt;};&lt;/p&gt;

&lt;p&gt;public Future&amp;lt;RpcResult&amp;lt;Void&amp;gt;&amp;gt;&lt;br/&gt;
        registerEndpoint(RegisterEndpointInput input) {&lt;br/&gt;
   WriteTransaction t = dataProvider.newWriteOnlyTransaction();&lt;/p&gt;

&lt;p&gt;   Endpoint ep = buildEndpoint(input)&lt;br/&gt;
           .setTimestamp(timestamp)&lt;br/&gt;
           .build();&lt;/p&gt;

&lt;p&gt;   EndpointKey key = &lt;br/&gt;
       new EndpointKey(ep.getL2Context(), ep.getMacAddress());&lt;br/&gt;
   InstanceIdentifier&amp;lt;Endpoint&amp;gt; iid = &lt;br/&gt;
       InstanceIdentifier.builder(Endpoints.class)&lt;br/&gt;
           .child(Endpoint.class, key)&lt;br/&gt;
           .build();&lt;/p&gt;

&lt;p&gt;   t.put(LogicalDatastoreType.OPERATIONAL, iid, ep);&lt;/p&gt;

&lt;p&gt;   ListenableFuture&amp;lt;RpcResult&amp;lt;TransactionStatus&amp;gt;&amp;gt; r = t.commit();&lt;br/&gt;
   return Futures.transform(r, futureTrans, executor);&lt;br/&gt;
}&lt;/p&gt;</description>
                <environment>&lt;p&gt;Operating System: Linux&lt;br/&gt;
Platform: PC&lt;/p&gt;</environment>
        <key id="25146">CONTROLLER-592</key>
            <summary>Always get ConflictingModificationException when writing</summary>
                <type id="10104" iconUrl="https://jira.opendaylight.org/secure/viewavatar?size=xsmall&amp;avatarId=10303&amp;avatarType=issuetype">Bug</type>
                                                <status id="5" iconUrl="https://jira.opendaylight.org/images/icons/statuses/resolved.png" description="A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.">Resolved</status>
                    <statusCategory id="3" key="done" colorName="green"/>
                                    <resolution id="10000">Done</resolution>
                                        <assignee username="tony.tkacik@gmail.com">Tony Tkacik</assignee>
                                    <reporter username="readams">Rob Adams</reporter>
                        <labels>
                    </labels>
                <created>Wed, 2 Jul 2014 16:40:19 +0000</created>
                <updated>Tue, 25 Jul 2023 08:23:57 +0000</updated>
                            <resolved>Fri, 25 Jul 2014 08:28:14 +0000</resolved>
                                                                    <component>mdsal</component>
                        <due>Fri, 18 Jul 2014 00:00:00 +0000</due>
                            <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="48615" author="tony.tkacik@gmail.com" created="Thu, 3 Jul 2014 14:34:22 +0000"  >&lt;p&gt;remote:   &lt;a href=&quot;https://git.opendaylight.org/gerrit/8619&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/8619&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="48616" author="readams@readams.net" created="Thu, 3 Jul 2014 17:44:10 +0000"  >&lt;p&gt;I tried with that patch and I still get the same error.&lt;/p&gt;</comment>
                            <comment id="48617" author="readams@readams.net" created="Thu, 3 Jul 2014 17:54:23 +0000"  >&lt;p&gt;It works though when I add:&lt;/p&gt;

&lt;p&gt;InstanceIdentifier&amp;lt;Endpoints&amp;gt; iid = &lt;br/&gt;
                InstanceIdentifier.builder(Endpoints.class).build();&lt;br/&gt;
        WriteTransaction t = this.dataProvider.newWriteOnlyTransaction();&lt;br/&gt;
        t.put(LogicalDatastoreType.OPERATIONAL, &lt;br/&gt;
              iid, new EndpointsBuilder().build());&lt;br/&gt;
        ListenableFuture&amp;lt;RpcResult&amp;lt;TransactionStatus&amp;gt;&amp;gt; f = t.commit();&lt;br/&gt;
        Futures.addCallback(f, new FutureCallback&amp;lt;RpcResult&amp;lt;TransactionStatus&amp;gt;&amp;gt;() {&lt;/p&gt;

&lt;p&gt;            @Override&lt;br/&gt;
            public void onSuccess(RpcResult&amp;lt;TransactionStatus&amp;gt; result) {&lt;/p&gt;

&lt;p&gt;            }&lt;/p&gt;

&lt;p&gt;            @Override&lt;br/&gt;
            public void onFailure(Throwable t) &lt;/p&gt;
{
                LOG.error(&quot;Could not write endpoint base container&quot;, t);
            }
&lt;p&gt;        });&lt;/p&gt;


&lt;p&gt;to my constructor.&lt;/p&gt;</comment>
                            <comment id="48618" author="tony.tkacik@gmail.com" created="Fri, 25 Jul 2014 08:28:14 +0000"  >&lt;p&gt;Added methods put and merge which allows you to explicitly state that you want&lt;br/&gt;
to create parents.&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                            <customfield id="customfield_11400" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10208" key="com.atlassian.jira.plugin.system.customfieldtypes:textfield">
                        <customfieldname>External issue ID</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1280</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10201" key="com.atlassian.jira.plugin.system.customfieldtypes:url">
                        <customfieldname>External issue URL</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[https://bugs.opendaylight.org/show_bug.cgi?id=1280]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10204" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>ODL SR Target Milestone</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10370"><![CDATA[Helium]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                    <customfield id="customfield_10000" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|i02lcn:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                </customfields>
    </item>
</channel>
</rss>