<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:23:10 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>[NETVIRT-1075] NeutronvpnUtils:  handle transactions with jobCoordinator to avoid blocking</title>
                <link>https://jira.opendaylight.org/browse/NETVIRT-1075</link>
                <project id="10144" key="NETVIRT">netvirt</project>
                    <description>&lt;p&gt;Now we are using&#160; in NeutronvpnUtils: updateVpnInstanceOpWithType&#160; blocking transaction:&lt;/p&gt;

&lt;p&gt;VpnInstanceOpDataEntryBuilder builder = new VpnInstanceOpDataEntryBuilder(vpnInstanceOpDataEntry);&lt;br/&gt;
 builder.setBgpvpnType(choice);&lt;br/&gt;
 WriteTransaction writeTxn = dataBroker.newWriteOnlyTransaction();&lt;br/&gt;
 writeTxn.merge(LogicalDatastoreType.OPERATIONAL, id, builder.build(), false);&lt;br/&gt;
 LOG.debug(&quot;updateVpnInstanceOpWithType: sent merge to operDS BgpvpnType {} for {}&quot;, choice, vpn.getValue());&lt;br/&gt;
 try {&lt;br/&gt;
&#160;&#160;&#160;&#160; writeTxn.submit().get();&lt;/p&gt;

&lt;p&gt;....&lt;/p&gt;

&lt;p&gt;And the same in some other methods.&lt;/p&gt;

&lt;p&gt;It will be better to refactor NeutronvpnUtils, and to use async transactions handeled by jobCoordinator as much as possible, to avoid blocking&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/57411/153/vpnservice/neutronvpn/neutronvpn-impl/src/main/java/org/opendaylight/netvirt/neutronvpn/NeutronvpnUtils.java@1627&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/57411/153/vpnservice/neutronvpn/neutronvpn-impl/src/main/java/org/opendaylight/netvirt/neutronvpn/NeutronvpnUtils.java@1627&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;</description>
                <environment></environment>
        <key id="29148">NETVIRT-1075</key>
            <summary>NeutronvpnUtils:  handle transactions with jobCoordinator to avoid blocking</summary>
                <type id="10100" iconUrl="https://jira.opendaylight.org/secure/viewavatar?size=xsmall&amp;avatarId=10310&amp;avatarType=issuetype">Improvement</type>
                                            <priority id="3" iconUrl="https://jira.opendaylight.org/images/icons/priorities/major.svg">Medium</priority>
                        <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="valentina.krasnobaeva">Valentina Krasnobaeva</assignee>
                                    <reporter username="valentina.krasnobaeva">Valentina Krasnobaeva</reporter>
                        <labels>
                    </labels>
                <created>Thu, 1 Feb 2018 18:21:21 +0000</created>
                <updated>Mon, 25 Nov 2019 07:36:43 +0000</updated>
                            <resolved>Mon, 25 Nov 2019 07:36:43 +0000</resolved>
                                                    <fixVersion>Magnesium</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="60914" author="pguibert6wind" created="Fri, 2 Feb 2018 10:46:24 +0000"  >&lt;p&gt;as illustration, the following code extract shows how to go from sync mode to async mode:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;by removing the try catch block and replacing with following code as illustration.&lt;/li&gt;
	&lt;li&gt;The error message will be displayed at some point, if there is a failure to do this.
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;
import org.opendaylight.infrautils.utils.concurrent.ListenableFutures;

WriteTransaction writeConfigTxn = dataBroker.newWriteOnlyTransaction();
ListenableFuture&amp;lt;Void&amp;gt; futures = writeConfigTxn.submit();

String errorText = &quot;addVpnInterfaceCall: Exception encountered while submitting writeConfigTxn&quot;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; + &quot; for interface &quot; + vpnInterface.getName() + &quot; on vpn &quot; + vpnName;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; ListenableFutures.addErrorLogging(futures, LOG, errorText);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ul&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_10000" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|i039z3:</customfieldvalue>

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