<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:11:03 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>[MDSAL-819] Deprecate Clustered(DOM)DataTreeChangeListener</title>
                <link>https://jira.opendaylight.org/browse/MDSAL-819</link>
                <project id="10137" key="MDSAL">mdsal</project>
                    <description>&lt;p&gt;The distinction through a dedicated sub-class is quite weird and is a source of bugs (like &lt;a href=&quot;https://jira.opendaylight.org/browse/AAA-258&quot; title=&quot;aaa-encrypt-service fails to start on follower nodes&quot; class=&quot;issue-link&quot; data-issue-key=&quot;AAA-258&quot;&gt;&lt;del&gt;AAA-258&lt;/del&gt;&lt;/a&gt;) and quite ugly hacks (in implementations).&lt;br/&gt;
Remove ClusteredDataTreeChangeListener interface and instead of that let the users specify the policy during registration.&lt;/p&gt;</description>
                <environment></environment>
        <key id="36801">MDSAL-819</key>
            <summary>Deprecate Clustered(DOM)DataTreeChangeListener</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="rkashapov">Ruslan Kashapov</assignee>
                                    <reporter username="rovarga">Robert Varga</reporter>
                        <labels>
                            <label>pt</label>
                    </labels>
                <created>Mon, 27 Mar 2023 07:21:46 +0000</created>
                <updated>Sat, 20 Jan 2024 16:36:37 +0000</updated>
                            <resolved>Fri, 19 Jan 2024 11:50:14 +0000</resolved>
                                                    <fixVersion>13.0.0</fixVersion>
                                    <component>Binding API</component>
                    <component>DOM API</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="72603" author="JIRAUSER13216" created="Mon, 18 Sep 2023 08:23:49 +0000"  >&lt;p&gt;The only place where ClusteredDataTreeChangeListener is actually differentiated from &quot;non-clustered&quot; DataTreeChangeListener is &lt;b&gt;sal-distributed-datastore&lt;/b&gt; component of Controller. &lt;a href=&quot;https://github.com/opendaylight/controller/blob/4acf2cb993eccd2546a8c374d7fa2716ff2d7a4d/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DataTreeChangeListenerProxy.java#L110&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;DataTreeChangeListenerProxy&lt;/a&gt; converts the listener interface difference into a boolean value &lt;ins&gt;&lt;em&gt;registerOnAllInstances&lt;/em&gt;&lt;/ins&gt; which then used in subsequent logic (akka message RegisterDataTreeChangeListener processed by &lt;a href=&quot;https://github.com/opendaylight/controller/blob/4acf2cb993eccd2546a8c374d7fa2716ff2d7a4d/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DataTreeChangeListenerSupport.java#L84&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;DataTreeChangeListenerSupport#onMessage&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;Specifying the policy on listener registration actually means moving the mentioned boolean property (defined using marking interface) from out of listener. So the new boolean property and listener instance now need to be delivered to same consumer independently of each other.&#160;&lt;/p&gt;

&lt;p&gt;Changing registration listener API is expected to be significant. Following basic interfaces and &lt;b&gt;all the ancestors&lt;/b&gt; need to be changed in order to add new parameter to &lt;ins&gt;&lt;em&gt;registerDataTreeChangeListener()&lt;/em&gt;&lt;/ins&gt; API method :&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;DataTreeChangeService (mdsal-binding-api, extended by DataBroker)&lt;/li&gt;
	&lt;li&gt;DOMDataTreeChangeService (mdsal-dom-api)&lt;/li&gt;
	&lt;li&gt;DOMStoreTreeChangePublisher (mdsal-dom-spi)&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;&lt;b&gt;All the&lt;/b&gt; affected implementations will require an update no mater the new parameter is taken into account (sal-distributed-datastore) or just ignored (all the other cases).&lt;/p&gt;

&lt;p&gt;From other hand the condition of either listener should be enabled for notifications on each node or only on a leader is mainly defined by listener purpose (implementation):&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;if it serves the states synchronization (like cache or configuration update) for local services then it&apos;s expected to be enabled on each node&lt;/li&gt;
	&lt;li&gt;if it generates new data/events and multiple active instances (doing same) could cause conflicts and/or resource waste then the listener expected to be active on single node&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;It means the single/all nodes activation mode property actually defined by (belongs to) listener, no reason to extract it out. It&apos;s easier and more safe (reliable) just to convert extra listener interface into actual property of a listener with clear naming/description of the option purpose/usage &#8211; see &lt;a href=&quot;https://git.opendaylight.org/gerrit/c/mdsal/+/107868&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/c/mdsal/+/107868&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;While this approach serves removal of extra listener interface and makes the clustered case &#160;usage more clear, this is mainly a cosmetic change, no performance impact is expected. Some may find this update unnecessary bc using of marking interface already works as expected. The further changes need clarification either to continue the update or leave as is.&lt;/p&gt;</comment>
                            <comment id="72604" author="rovarga" created="Mon, 18 Sep 2023 08:37:29 +0000"  >&lt;p&gt;Thank you for exhaustive analysis. The task is still relevant as it was originally defined.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10003">
                    <name>Relates</name>
                                                                <inwardlinks description="relates to">
                                        <issuelink>
            <issuekey id="36802">AAA-258</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <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|i044mv:</customfieldvalue>

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