<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:52:46 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>[YANGTOOLS-276] SFc Project broken due to recent controller/yangtools commit</title>
                <link>https://jira.opendaylight.org/browse/YANGTOOLS-276</link>
                <project id="10188" key="YANGTOOLS">yangtools</project>
                    <description>&lt;p&gt;The scenario is a complete overwrite of a datastore element. During OndataChanged() I spawn an executor to overwrite the data that triggered onDataChanged() itself. &lt;/p&gt;

&lt;p&gt;Meaning, an element with a certain key already exists and I&apos;m overwriting it with new values.&lt;/p&gt;

&lt;p&gt;This has always worked until 24hrs ago. &lt;/p&gt;

&lt;p&gt;On 8/22/14 9:54 AM, Reinaldo Penno wrote:&lt;br/&gt;
&amp;gt; Hi,&lt;br/&gt;
&amp;gt;&lt;br/&gt;
&amp;gt; I think a controller/Yangtools commit broke SFC project in the last 24 hrs.&lt;br/&gt;
&amp;gt;&lt;br/&gt;
&amp;gt; Something that always worked until the last 24 hrs, stopped working. Basically this operation&lt;br/&gt;
&amp;gt;&lt;br/&gt;
&amp;gt;         writeTx.put(LogicalDatastoreType.CONFIGURATION,&lt;br/&gt;
&amp;gt;                 sfpIID, newServiceFunctionPath, true);&lt;br/&gt;
&amp;gt;&lt;br/&gt;
&amp;gt;&lt;br/&gt;
&amp;gt; Now gives me:&lt;br/&gt;
&amp;gt;&lt;br/&gt;
&amp;gt;     at com.google.common.base.Preconditions.checkArgument(Preconditions.java:76)&lt;br/&gt;
&amp;gt;     at org.opendaylight.yangtools.yang.data.impl.schema.ImmutableNormalizedNodeStreamWriter.startOrderedMapNode(ImmutableNormalizedNodeStreamWriter.java:188)&lt;br/&gt;
&amp;gt;     at org.opendaylight.yangtools.binding.data.codec.impl.BindingToNormalizedStreamWriter.startOrderedMapNode(BindingToNormalizedStreamWriter.java:173)&lt;br/&gt;
&amp;gt;     at org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.sfc.sfp.rev140701.service.function.paths.ServiceFunctionPath$StreamWriter.serialize(DataObjectSerializerPrototype.java)&lt;br/&gt;
&amp;gt;     at org.opendaylight.yangtools.binding.data.codec.impl.BindingNormalizedNodeCodecRegistry$DataObjectSerializerProxy.serialize(BindingNormalizedNodeCodecRegistry.java:180)&lt;br/&gt;
&amp;gt;     at org.opendaylight.yangtools.binding.data.codec.impl.BindingNormalizedNodeCodecRegistry.toNormalizedNode(BindingNormalizedNodeCodecRegistry.java:91)&lt;br/&gt;
&amp;gt;     at org.opendaylight.controller.md.sal.binding.impl.BindingToNormalizedNodeCodec.toNormalizedNode(BindingToNormalizedNodeCodec.java:54)&lt;br/&gt;
&amp;gt;     at org.opendaylight.controller.md.sal.binding.impl.AbstractWriteTransaction.put(AbstractWriteTransaction.java:46)&lt;br/&gt;
&amp;gt;     at org.opendaylight.sfc.provider.SfcProviderServicePathAPI.createServiceFunctionPathEntry(SfcProviderServicePathAPI.java:317)&lt;br/&gt;
&amp;gt;     ... 8 more&lt;br/&gt;
&amp;gt;&lt;br/&gt;
&amp;gt;&lt;/p&gt;

&lt;p&gt;What I noticed is that in OnDataChanged() instead of getting an actual object (as I used to) I&apos;m getting a LazyDataObject and the data is Immutable.&lt;/p&gt;

&lt;p&gt;    h = &lt;/p&gt;
{org.opendaylight.yangtools.binding.data.codec.impl.LazyDataObject@12331}
&lt;p&gt;    cachedData = &lt;/p&gt;
{java.util.concurrent.ConcurrentHashMap@12332}
&lt;p&gt; size = 5&lt;br/&gt;
    data = &lt;/p&gt;
{org.opendaylight.yangtools.yang.data.impl.schema.builder.impl.ImmutableMapEntryNodeBuilder$ImmutableMapEntryNode@12333}
&lt;p&gt;&quot;ImmutableMapEntryNode{nodeIdentifier=(urn:cisco:params:xml:ns:yang:sfc-sfp?revision=2014-07-01)service-function-path[&lt;/p&gt;
{(urn:cisco:params:xml:ns:yang:sfc-sfp?revision=2014-07-01)name=Path-2-SFC1}
&lt;p&gt;], value=[ImmutableLeafNode{nodeIdentifier=(urn:cisco:params:...&lt;br/&gt;
    context = &lt;/p&gt;
{org.opendaylight.yangtools.binding.data.codec.impl.ListNodeCodecContext@11961}
&lt;p&gt;&quot;ListNodeCodecContext &lt;span class=&quot;error&quot;&gt;&amp;#91;interface org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.sfc.sfp.rev140701.service.function.paths.ServiceFunctionPath&amp;#93;&lt;/span&gt;&quot;&lt;br/&gt;
    cachedAugmentations = &lt;/p&gt;
{com.google.common.collect.EmptyImmutableBiMap@11962}
&lt;p&gt; size = 0&lt;br/&gt;
    cachedHashcode = null&lt;/p&gt;




&lt;p&gt;&amp;gt; The scenario is a complete overwrite of a datastore element. Meaning, an element with a certain key already exists and I&apos;m overwriting it with new values.&lt;br/&gt;
&amp;gt;&lt;br/&gt;
&amp;gt; Anybody knows what this could be?&lt;/p&gt;</description>
                <environment>&lt;p&gt;Operating System: Mac OS&lt;br/&gt;
Platform: PC&lt;/p&gt;</environment>
        <key id="22696">YANGTOOLS-276</key>
            <summary>SFc Project broken due to recent controller/yangtools commit</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="tony.tkacik@gmail.com">Tony Tkacik</assignee>
                                    <reporter username="repenno">Reinaldo Penno</reporter>
                        <labels>
                    </labels>
                <created>Fri, 22 Aug 2014 17:40:27 +0000</created>
                <updated>Sun, 10 Apr 2022 18:35:16 +0000</updated>
                            <resolved>Mon, 25 Aug 2014 09:41:56 +0000</resolved>
                                                                        <due></due>
                            <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="42996" author="rapenno@gmail.com" created="Fri, 22 Aug 2014 17:41:38 +0000"  >&lt;p&gt;        WriteTransaction writeTx = odlSfc.dataProvider.newWriteOnlyTransaction();&lt;br/&gt;
        writeTx.put(LogicalDatastoreType.CONFIGURATION,&lt;br/&gt;
                sfpIID, newServiceFunctionPath, true);&lt;/p&gt;</comment>
                            <comment id="42997" author="rapenno@gmail.com" created="Sat, 23 Aug 2014 14:35:04 +0000"  >&lt;p&gt;The test below is against &quot;ImmutableOrderedMapNodeBuilder&quot; but getcurrent returns &quot;ImmutableMapEntryNodeBuilder&quot;. &lt;/p&gt;

&lt;p&gt;The corresponding Yang model uses ordered-by user. &lt;/p&gt;


&lt;p&gt;    @Override&lt;br/&gt;
    public void startOrderedMapNode(final NodeIdentifier name,final int childSizeHint) throws IllegalArgumentException {&lt;br/&gt;
        if(!(getCurrent() instanceof NormalizedNodeResultBuilder)) &lt;/p&gt;
{
            Preconditions.checkArgument(getCurrent() instanceof ImmutableOrderedMapNodeBuilder);
        }
&lt;p&gt;        enter(Builders.mapBuilder().withNodeIdentifier(name));&lt;br/&gt;
    }&lt;/p&gt;</comment>
                            <comment id="42998" author="rapenno@gmail.com" created="Sat, 23 Aug 2014 15:00:26 +0000"  >&lt;p&gt;Tested some more and can say that the issue is the Yang statement&lt;/p&gt;

&lt;p&gt; ordered-by user;&lt;/p&gt;

&lt;p&gt;This was handled properly until very recently and now is broken.&lt;/p&gt;</comment>
                            <comment id="42999" author="rapenno@gmail.com" created="Sun, 24 Aug 2014 13:34:05 +0000"  >&lt;p&gt;My scenario is&lt;/p&gt;

&lt;p&gt;1 - RESTconf PUTs new data&lt;br/&gt;
2 - OnDataChanged() gets called&lt;br/&gt;
3 - I look at this new data and create a completely new data (only key is the same)&lt;br/&gt;
4 - I writeTx.put this new data.&lt;/p&gt;

&lt;p&gt;Also, please allow me to be very clear:&lt;/p&gt;

&lt;p&gt;If I remove &quot;ordered-by user&quot; from my Yang list, everything works. Same code, same everything.&lt;/p&gt;</comment>
                            <comment id="43000" author="tony.tkacik@gmail.com" created="Mon, 25 Aug 2014 07:25:39 +0000"  >&lt;p&gt;The precondition was wrong, this was caused by refactor&lt;br/&gt;
of internals of this class.&lt;/p&gt;

&lt;p&gt;FIx is in:&lt;br/&gt;
&lt;a href=&quot;https://git.opendaylight.org/gerrit/10235&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/10235&lt;/a&gt;&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>1604</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=1604]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10202" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Priority</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10313"><![CDATA[Highest]]></customfieldvalue>

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

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