<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:38:48 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>[SFC-164] The OpendaylightSfc singleton should be refactored to work better with the new blueprint changes</title>
                <link>https://jira.opendaylight.org/browse/SFC-164</link>
                <project id="10167" key="SFC">sfc</project>
                    <description>&lt;p&gt;Suggestions for improvements by Alexis de Talhou&#235;t from this code review:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/45438/1/sfc-ovs/src/main/resources/org/opendaylight/blueprint/sfc-ovs.xml&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/45438/1/sfc-ovs/src/main/resources/org/opendaylight/blueprint/sfc-ovs.xml&lt;/a&gt;&lt;/p&gt;


&lt;p&gt;By looking closer at it, it seems this class is providing those things:&lt;/p&gt;

&lt;p&gt;    InstanceIdentifier across the project&lt;br/&gt;
    ExecutorService statically defined&lt;br/&gt;
    close method clearing the whole SFC datastore&lt;br/&gt;
    an init method called in the sfc-provider&lt;br/&gt;
    some utility getters providing things given by blueprint&apos;s service registery&lt;/p&gt;

&lt;p&gt;I think the main concerns of having this class new in every bundle are the close() method and the ExecutorService definition (thread pool of 100). Regarding the close() method, it is well-know that ODL doesn&apos;t support uninstall (yet), thus not such a big deal, but it can blow here and there on shutdown because of this. Regarding the ExecutorService, this is more concerning, because you don&apos;t want to exhaust the thread pool available in the host running ODL (even though this might not happen, you better be safe). Moreover, the initial intention was to have only one thread pool of 100 threads shared across the whole SFC project.&lt;/p&gt;

&lt;p&gt;To sum up, I guess for now this is fine, but once all blueprint patches are there, the OpendaylightSfc class needs to be rework and/or break down, and the ExecturoService needs to become shared across all bundle. To do the later, you can defined a FixedThreadPoolWrapper ( &lt;a href=&quot;https://github.com/opendaylight/controller/blob/master/opendaylight/config/threadpool-config-impl/src/main/java/org/opendaylight/controller/config/threadpool/util/FixedThreadPoolWrapper.java&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/opendaylight/controller/blob/master/opendaylight/config/threadpool-config-impl/src/main/java/org/opendaylight/controller/config/threadpool/util/FixedThreadPoolWrapper.java&lt;/a&gt; ) in the sfc-provider, and expose the ThreadPool service so it can be gathered from the service registery.&lt;/p&gt;</description>
                <environment>&lt;p&gt;Operating System: All&lt;br/&gt;
Platform: All&lt;/p&gt;</environment>
        <key id="24190">SFC-164</key>
            <summary>The OpendaylightSfc singleton should be refactored to work better with the new blueprint changes</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="guillermo.pablo.tomasini.redondas@ericsson.com">Guillermo Pablo Tomasini</assignee>
                                    <reporter username="ebrjohn">Brady Johnson</reporter>
                        <labels>
                    </labels>
                <created>Wed, 21 Sep 2016 10:20:52 +0000</created>
                <updated>Tue, 29 May 2018 15:31:06 +0000</updated>
                            <resolved>Tue, 29 May 2018 15:31:06 +0000</resolved>
                                    <version>unspecified</version>
                                                    <component>General</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="46699" author="guillermo.pablo.tomasini.redondas@ericsson.com" created="Tue, 27 Sep 2016 10:31:01 +0000"  >&lt;p&gt;I have noticed that the wiring in the bundles using &quot;OpendaylightSfc&quot; class is not well done, you should be done by blueprint injection, not manually by the getOpendaylightObj(). I.e sfc-netconf. &lt;br/&gt;
So I think that getter is redundant using blueprint wiring.&lt;br/&gt;
A singleton never could be instantiated like a bean in blueprint, because blueprint is responsible of bean creation, so &quot;Opendaylightsfc&quot; class shouldn&apos;t be a singleton.&lt;/p&gt;</comment>
                            <comment id="46700" author="guillermo.pablo.tomasini.redondas@ericsson.com" created="Tue, 27 Sep 2016 15:43:00 +0000"  >&lt;p&gt;Even within the same bundle sfc-provider the wiring is not quite right, for example some class are pulling from the getter &quot;getOpendaylightSfc()&quot; in order to retrieve an instance of that classs instead of using blueprint injection. I.e: SfcProviderRpc, SfcProviderSfEntryDataListener, SfcProviderSfEntryDataListener, SfcDataStoreAPI, etc. I must fix that wiring in that bundle in order to dispense getOpendaylightSfc.&lt;/p&gt;</comment>
                            <comment id="46701" author="guillermo.pablo.tomasini.redondas@ericsson.com" created="Wed, 28 Sep 2016 10:25:51 +0000"  >&lt;p&gt;SfcDataStoreAPI class (@rpc-provider) must depend on DataBroker Service, no on OpendaylightSfc class as nowadays, I must fix that also in blueprint (rpc-provider).&lt;/p&gt;</comment>
                            <comment id="46702" author="guillermo.pablo.tomasini.redondas@ericsson.com" created="Fri, 30 Sep 2016 11:00:46 +0000"  >&lt;p&gt;I consider that classes instantiated as beans in blueprint should not instantiate another classes with new operator. Instead they should use the blueprint injection (&amp;lt;property name=.... ref=... &amp;gt;).&lt;/p&gt;</comment>
                            <comment id="46703" author="guillermo.pablo.tomasini.redondas@ericsson.com" created="Fri, 30 Sep 2016 12:06:54 +0000"  >&lt;p&gt;There are some classes pulling OpendaylightSfc bean in order of get DataProvider and Broker services, using indirection (through getDataProvider() and getBroker() getters). Why the indirection? if we cant inject both services direct to the beans wich requiere those references. I can fix that.&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>6768</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=6768]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10206" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Issue Type</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10305"><![CDATA[Improvement]]></customfieldvalue>

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

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

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