<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 19:52:41 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-299] MD-SAL datastore does not defer work to other threads or thread pools</title>
                <link>https://jira.opendaylight.org/browse/CONTROLLER-299</link>
                <project id="10113" key="CONTROLLER">controller</project>
                    <description>&lt;p&gt;It seems like this code results in a deadlock:&lt;/p&gt;

&lt;p&gt;public void onDataChanged(DataChangeEvent&amp;lt;InstanceIdentifier&amp;lt;?&amp;gt;, DataObject&amp;gt; change) {&lt;br/&gt;
    DataModification&amp;lt;InstanceIdentifier&amp;lt;?&amp;gt;, DataObject&amp;gt; tx = dataBroker.beginTransaction();&lt;br/&gt;
    ...&lt;br/&gt;
    tx.commit().get();&lt;br/&gt;
}&lt;/p&gt;

&lt;p&gt;Which suggests that the call to commit() does not defer the execution to a separate thread (or thread pool), but wants to execute it on the caller thread. Despite the fact that commit() returns a Future, which suggests it to be async.&lt;/p&gt;

&lt;p&gt;I understand that I can work around this by manipulating threads on my own (explicitly spawning, JDKFutures, etc.).&lt;/p&gt;

&lt;p&gt;However, I believe the current behavior is against the &quot;principle of least astonishment&quot;, and should be fixed. Or if this is the designed behavior, it should be clearly documented.&lt;/p&gt;

&lt;p&gt;Use the attached bundle to reproduce. Once the system is stable, execute ./runme, which will trigger the data change event. That in turn will start a new transaction, and wait for it&apos;s result...&lt;/p&gt;


&lt;p&gt;Also see this thread on the topic:&lt;br/&gt;
&lt;a href=&quot;https://lists.opendaylight.org/pipermail/controller-dev/2014-April/003556.html&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://lists.opendaylight.org/pipermail/controller-dev/2014-April/003556.html&lt;/a&gt;&lt;/p&gt;</description>
                <environment>&lt;p&gt;Operating System: All&lt;br/&gt;
Platform: All&lt;/p&gt;</environment>
        <key id="24853">CONTROLLER-299</key>
            <summary>MD-SAL datastore does not defer work to other threads or thread pools</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="10003">Cannot Reproduce</resolution>
                                        <assignee username="mayagarw@cisco.com">Mayank Agarwal</assignee>
                                    <reporter username="zoltan.lajos.kis@ericsson.com">Zoltan Lajos Kis</reporter>
                        <labels>
                    </labels>
                <created>Wed, 9 Apr 2014 06:12:01 +0000</created>
                <updated>Tue, 25 Jul 2023 08:23:26 +0000</updated>
                            <resolved>Fri, 30 May 2014 18:12:53 +0000</resolved>
                                                                    <component>mdsal</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="47944" author="zoltan.lajos.kis@ericsson.com" created="Wed, 9 Apr 2014 06:12:01 +0000"  >&lt;p&gt;Attachment mdsaltest.tar.gz has been added with description: test bundle for creating deadlock&lt;/p&gt;</comment>
                            <comment id="47943" author="mayagarw@cisco.com" created="Fri, 30 May 2014 18:12:07 +0000"  >&lt;p&gt;Email discussion based on which this bug is being marked as Resolved.&lt;/p&gt;</comment>
                            <comment id="47945" author="mayagarw@cisco.com" created="Fri, 30 May 2014 18:12:07 +0000"  >&lt;p&gt;Attachment RE- &lt;span class=&quot;error&quot;&gt;&amp;#91;controller-dev&amp;#93;&lt;/span&gt; MD-SAL data store threading model.eml has been added with description: Email discussion&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                            <attachment id="13368" name="RE- [controller-dev] MD-SAL data store threading model.eml" size="64269" author="mayagarw@cisco.com" created="Fri, 30 May 2014 18:12:07 +0000"/>
                            <attachment id="13367" name="mdsaltest.tar.gz" size="3713" author="zoltan.lajos.kis@ericsson.com" created="Wed, 9 Apr 2014 06:12:01 +0000"/>
                    </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>703</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=703]]></customfieldvalue>

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

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