<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:08:35 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-80] Lack of default comparator</title>
                <link>https://jira.opendaylight.org/browse/MDSAL-80</link>
                <project id="10137" key="MDSAL">mdsal</project>
                    <description>&lt;p&gt;Presently, the only code generated by yangtools for objects is equals().&lt;/p&gt;

&lt;p&gt;This limits the possible scalable lookup methods for storing large number of objects to HashMap() and derivatives.&lt;/p&gt;

&lt;p&gt;There is a number of key areas where hashmap is known to be the wrong answer - v4 prefixes and routing tables, large numbers of tunnels, etc. These are better services by a variety of a Tree (f.e. B tree). &lt;/p&gt;

&lt;p&gt;Trees require a comparator which returns less, equal, more in order to be implemented. This is missing.&lt;/p&gt;

&lt;p&gt;Proposal:&lt;/p&gt;

&lt;p&gt;In addition to the current equals() to have a compare() method which by default returns the lexical compare of the string representation. &lt;/p&gt;

&lt;p&gt;If overrides and optimizations are implemented (f.e. for prefixes and ip addresses), more appropriate comparators can be implemented. Example - taking the prefix length into account when comparing prefixes so they can be arranged into a tree for a fast longest prefix match.&lt;/p&gt;</description>
                <environment>&lt;p&gt;Operating System: All&lt;br/&gt;
Platform: All&lt;/p&gt;</environment>
        <key id="26902">MDSAL-80</key>
            <summary>Lack of default comparator</summary>
                <type id="10100" iconUrl="https://jira.opendaylight.org/secure/viewavatar?size=xsmall&amp;avatarId=10310&amp;avatarType=issuetype">Improvement</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="10001">Won&apos;t Do</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="aivanov@brocade.com">Anton Ivanov</reporter>
                        <labels>
                    </labels>
                <created>Tue, 21 Apr 2015 11:09:46 +0000</created>
                <updated>Fri, 9 Mar 2018 18:00:07 +0000</updated>
                            <resolved>Thu, 27 Oct 2016 17:12:49 +0000</resolved>
                                                                        <due></due>
                            <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="54112" author="rovarga" created="Thu, 27 Oct 2016 10:16:08 +0000"  >&lt;p&gt;Unless I am missing something, this can easily be addressed externally by supplying a specific Comparator for the collection in which the object is being stored.&lt;/p&gt;</comment>
                            <comment id="54113" author="aivanov@brocade.com" created="Thu, 27 Oct 2016 16:11:27 +0000"  >&lt;p&gt;(In reply to Robert Varga from comment #1)&lt;br/&gt;
&amp;gt; Unless I am missing something, this can easily be addressed externally by&lt;br/&gt;
&amp;gt; supplying a specific Comparator for the collection in which the object is&lt;br/&gt;
&amp;gt; being stored. &lt;/p&gt;

&lt;p&gt;A Collection a B-tree does not make and all high performance algos for working with large routing tables, etc are tree/radix based. They are not based on sorted collection and only &quot;intro level&quot; ones are based on maps/hashmaps.&lt;/p&gt;

&lt;p&gt;If there is no comparator you cannot implement these in a standardized fashion so it can be reused, each implementation has to be bespoke.&lt;/p&gt;

&lt;p&gt;A.&lt;/p&gt;</comment>
                            <comment id="54114" author="rovarga" created="Thu, 27 Oct 2016 17:12:49 +0000"  >&lt;p&gt;This is pretty much a question of how you integrate into a particular data structure. We simply cannot provide all of that integration unless there is a well-described common pattern and if a different structure, requiring different type of integration occurs, we will end up going back to basics.&lt;/p&gt;

&lt;p&gt;In your line of argumentation it is impossible to store objects which do not implement java.util.Comparable in a java.util.TreeMap.&lt;/p&gt;

&lt;p&gt;Except it is, as you can provide a java.util.Comparator at TreeMap instantiation time, which the implementation will consult to understand how the object being inserted/looked up compares to other objects.&lt;/p&gt;

&lt;p&gt;The same design pattern should be followed when integrating with external data structures.&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>3032</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=3032]]></customfieldvalue>

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

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

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