<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:32:41 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>[OPNFLWPLUG-513] Exception at removeUnreportedFlows in StatisticsManagerImpl</title>
                <link>https://jira.opendaylight.org/browse/OPNFLWPLUG-513</link>
                <project id="10155" key="OPNFLWPLUG">OpenFlowPlugin</project>
                    <description>&lt;p&gt;This bug is found in stable/lithium and also main.&lt;/p&gt;

&lt;p&gt;2015-07-07 14:37:15,748 | WARN  | ds-oper-thread-0 | StatisticsManagerImpl            | 264 - org.opendaylight.openflowplugin.applications.statistics-manager - 0.1.1.SNAPSHOT | Unhandled exception during processing statistics. Restarting transaction chain.&lt;br/&gt;
java.lang.NullPointerException&lt;br/&gt;
        at org.opendaylight.openflowplugin.applications.statistics.manager.impl.StatListenCommitFlow$TableFlowUpdateState.removeUnreportedFlows(StatListenCommitFlow.java:464)&lt;span class=&quot;error&quot;&gt;&amp;#91;264:org.opendaylight.openflowplugin.applications.statistics-manager:0.1.1.SNAPSHOT&amp;#93;&lt;/span&gt;&lt;br/&gt;
        at org.opendaylight.openflowplugin.applications.statistics.manager.impl.StatListenCommitFlow.statsFlowCommitAll(StatListenCommitFlow.java:262)&lt;span class=&quot;error&quot;&gt;&amp;#91;264:org.opendaylight.openflowplugin.applications.statistics-manager:0.1.1.SNAPSHOT&amp;#93;&lt;/span&gt;&lt;br/&gt;
        at org.opendaylight.openflowplugin.applications.statistics.manager.impl.StatListenCommitFlow.access$000(StatListenCommitFlow.java:82)&lt;span class=&quot;error&quot;&gt;&amp;#91;264:org.opendaylight.openflowplugin.applications.statistics-manager:0.1.1.SNAPSHOT&amp;#93;&lt;/span&gt;&lt;br/&gt;
        at org.opendaylight.openflowplugin.applications.statistics.manager.impl.StatListenCommitFlow$2.applyOperation(StatListenCommitFlow.java:208)&lt;span class=&quot;error&quot;&gt;&amp;#91;264:org.opendaylight.openflowplugin.applications.statistics-manager:0.1.1.SNAPSHOT&amp;#93;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;After the exception, there were side-effect null pointer exceptions whenever there were statistics poll.&lt;/p&gt;

&lt;p&gt;The fix is simple:&lt;br/&gt;
diff --git a/applications/statistics-manager/src/main/java/org/opendaylight/open&lt;br/&gt;
index 71d34dc..2180e09 100644&lt;br/&gt;
&amp;#8212; a/applications/statistics-manager/src/main/java/org/opendaylight/openflowplu&lt;br/&gt;
+++ b/applications/statistics-manager/src/main/java/org/opendaylight/openflowplu&lt;br/&gt;
@@ -461,7 +461,7 @@ public class StatListenCommitFlow extends StatAbstractListen&lt;br/&gt;
                 final InstanceIdentifier&amp;lt;Flow&amp;gt; flowRef = tableRef.child(Flow.cl&lt;br/&gt;
                 if (nodeDeleteMap != null &amp;amp;&amp;amp; flowKey.getId().getValue().startsW&lt;br/&gt;
                     final Integer lifeIndex = nodeDeleteMap.get(flowRef);&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;if (lifeIndex &amp;gt; 0) {&lt;br/&gt;
+                    if (lifeIndex != null &amp;amp;&amp;amp; lifeIndex &amp;gt; 0) 
{
                         break;
                     }
&lt;p&gt; else {&lt;br/&gt;
                         nodeDeleteMap.remove(flowRef);&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
                <environment>&lt;p&gt;Operating System: All&lt;br/&gt;
Platform: All&lt;/p&gt;</environment>
        <key id="27781">OPNFLWPLUG-513</key>
            <summary>Exception at removeUnreportedFlows in StatisticsManagerImpl</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="monika.verma1@tcs.com">Monika Verma</assignee>
                                    <reporter username="henry.fung@live.com">Henry Fung</reporter>
                        <labels>
                    </labels>
                <created>Wed, 8 Jul 2015 05:31:19 +0000</created>
                <updated>Mon, 27 Sep 2021 09:01:36 +0000</updated>
                            <resolved>Fri, 27 Nov 2015 04:26:31 +0000</resolved>
                                                                    <component>General</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>6</watches>
                                                                                                                <comments>
                            <comment id="57160" author="partha.datta@tcs.com" created="Mon, 3 Aug 2015 10:38:38 +0000"  >&lt;p&gt;Reassigned to sunaina.khanna&lt;/p&gt;</comment>
                            <comment id="57161" author="sunaina.khanna@tcs.com" created="Tue, 4 Aug 2015 11:18:31 +0000"  >&lt;p&gt;Hi Henry,&lt;br/&gt;
         Can you please tell me how to replicate this bug.I tried to replicate the bug but no error is shown on deleting the unreported flow via rest on the karaf window.&lt;/p&gt;</comment>
                            <comment id="57162" author="henry.fung@live.com" created="Tue, 4 Aug 2015 16:23:27 +0000"  >&lt;p&gt;Hi Sunaina,&lt;br/&gt;
I had many flows programmed, deleted, and reprogrammed via FRM. I know it is not easy to reproduce, but by code inspection, we can tell something wrong.&lt;/p&gt;</comment>
                            <comment id="57163" author="mirehak@cisco.com" created="Mon, 10 Aug 2015 12:14:46 +0000"  >&lt;p&gt;&lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/25111/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/25111/&lt;/a&gt; merged&lt;br/&gt;
(would be nice to have unit test proving this right)&lt;/p&gt;</comment>
                            <comment id="57164" author="sunaina.khanna@tcs.com" created="Wed, 12 Aug 2015 16:44:46 +0000"  >&lt;p&gt;Sure,but I could not find the test cases for the class.Should I implement the test cases for the same?&lt;/p&gt;</comment>
                            <comment id="57165" author="mirehak@cisco.com" created="Thu, 13 Aug 2015 10:06:35 +0000"  >&lt;p&gt;Well best practices claim that every fix should be accompanied by (unit) test proving that fix right. If such a test already exits then fix the test first so that it fails upon that issue.&lt;br/&gt;
If no test exists yet and if sticking to TTD then you can even first write the unit test failing upon the issue. And then add the fix so that your push will contain passing green test and fix.&lt;/p&gt;

&lt;p&gt;In this case you can create new test class and focus on that particular method (removeUnreportedFlows()).&lt;/p&gt;

&lt;p&gt;And of course if you feel confident in adding unit test coverage for class StatListenCommitFlow then you are welcome to cover even more of it.&lt;/p&gt;</comment>
                            <comment id="57166" author="monika.verma1@tcs.com" created="Fri, 27 Nov 2015 04:26:31 +0000"  >&lt;p&gt;Added the unit tests covering the method removeUnreportedFlows() and some part of method statsFlowCommitAll()&lt;br/&gt;
Gerrit ID: &lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/30244/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/30244/&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>3957</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=3957]]></customfieldvalue>

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

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