<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:14:49 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>[NETCONF-359] restconf response taking 20s when sent to isolated Candidate node.</title>
                <link>https://jira.opendaylight.org/browse/NETCONF-359</link>
                <project id="10142" key="NETCONF">netconf</project>
                    <description>&lt;p&gt;this is affected some CSIT jobs and makes them spend a lot of wasted time.&lt;/p&gt;

&lt;p&gt;This email thread sort of explains it:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://lists.opendaylight.org/pipermail/integration-dev/2017-January/008967.html&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://lists.opendaylight.org/pipermail/integration-dev/2017-January/008967.html&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;to reproduce you can bring up a three node cluster. then kill the leader&lt;br/&gt;
node and one of the followers. the remaining node that stays up will be in&lt;br/&gt;
Candidate state. next send a simple rest request (e.g. /restconf/streams )&lt;br/&gt;
to this node. The request will be open and pending for 20s before it&apos;s&lt;br/&gt;
answered.&lt;/p&gt;

&lt;p&gt;in csit where there tend to be a lot of these requests, when this &lt;br/&gt;
is seen it can severely add to the runtime of the test.&lt;/p&gt;

&lt;p&gt;If possible, even if the response needs to be an error, the response should&lt;br/&gt;
come back right away. It seems there is some internal timer/timeout &lt;br/&gt;
getting in the way here, since it&apos;s always 20s.&lt;/p&gt;</description>
                <environment>&lt;p&gt;Operating System: All&lt;br/&gt;
Platform: All&lt;/p&gt;</environment>
        <key id="21372">NETCONF-359</key>
            <summary>restconf response taking 20s when sent to isolated Candidate node.</summary>
                <type id="10104" iconUrl="https://jira.opendaylight.org/secure/viewavatar?size=xsmall&amp;avatarId=10303&amp;avatarType=issuetype">Bug</type>
                                                <status id="10004" iconUrl="https://jira.opendaylight.org/images/icons/status_generic.gif" description="">Verified</status>
                    <statusCategory id="3" key="done" colorName="green"/>
                                    <resolution id="10000">Done</resolution>
                                        <assignee username="jluhrsen">Jamo Luhrsen</assignee>
                                    <reporter username="jluhrsen">Jamo Luhrsen</reporter>
                        <labels>
                    </labels>
                <created>Fri, 3 Mar 2017 06:12:40 +0000</created>
                <updated>Fri, 15 Mar 2019 22:22:36 +0000</updated>
                            <resolved>Fri, 31 Aug 2018 18:29:19 +0000</resolved>
                                                                    <component>restconf-nb</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>5</watches>
                                                                                                                <comments>
                            <comment id="39873" author="tpantelis" created="Sun, 5 Mar 2017 09:28:21 +0000"  >&lt;p&gt;This is by design. It tries to fulfill the request by waiting for a new leader to be elected for a period of time (2 X the election timeout, which is 10 sec by default).&lt;/p&gt;

&lt;p&gt;This is the way it currently works however Robert is changing the front-end implementation with the &lt;a href=&quot;https://jira.opendaylight.org/browse/CONTROLLER-1483&quot; title=&quot;akka.pattern.AskTimeoutException on follower while BGP peer introduces 1M prefixes&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CONTROLLER-1483&quot;&gt;&lt;del&gt;CONTROLLER-1483&lt;/del&gt;&lt;/a&gt; patch series so not sure what the exact behavior will be.&lt;/p&gt;</comment>
                            <comment id="39874" author="jluhrsen" created="Sun, 5 Mar 2017 16:44:13 +0000"  >&lt;p&gt;(In reply to Tom Pantelis from comment #1)&lt;br/&gt;
&amp;gt; This is by design. It tries to fulfill the request by waiting for a new&lt;br/&gt;
&amp;gt; leader to be elected for a period of time (2 X the election timeout, which&lt;br/&gt;
&amp;gt; is 10 sec by default).&lt;br/&gt;
&amp;gt; &lt;br/&gt;
&amp;gt; This is the way it currently works however Robert is changing the front-end&lt;br/&gt;
&amp;gt; implementation with the &lt;a href=&quot;https://jira.opendaylight.org/browse/CONTROLLER-1483&quot; title=&quot;akka.pattern.AskTimeoutException on follower while BGP peer introduces 1M prefixes&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CONTROLLER-1483&quot;&gt;&lt;del&gt;CONTROLLER-1483&lt;/del&gt;&lt;/a&gt; patch series so not sure what the exact&lt;br/&gt;
&amp;gt; behavior will be.&lt;/p&gt;

&lt;p&gt;what would be the downside to giving an &quot;unavailable&quot; response in such a &lt;br/&gt;
case instead of waiting for a new leader?&lt;/p&gt;</comment>
                            <comment id="39875" author="tpantelis" created="Sun, 5 Mar 2017 23:45:42 +0000"  >&lt;p&gt;As I mentioned, it makes every reasonable effort to fulfill the request before returning an error. I don&apos;t think that&apos;s wrong and I don&apos;t think we should eliminate retries just to make tests run shorter. &lt;/p&gt;

&lt;p&gt;The election-timeout is shard-heartbeat-interval-in-millis (500) x shard-election-timeout-factor (20) which is 10 sec by default. For the test you can reduce the shard-election-timeout-factor in the .cfg file to say 10 to cut the time in half.&lt;/p&gt;</comment>
                            <comment id="39876" author="tpantelis" created="Mon, 6 Mar 2017 00:12:57 +0000"  >&lt;p&gt;The reason for retries is for resiliency. So if the leader was transitioning when a transaction was submitted, retries enable the transaction to succeed rather  than failing immediately.&lt;/p&gt;</comment>
                            <comment id="39877" author="rovarga" created="Mon, 6 Mar 2017 10:56:24 +0000"  >&lt;p&gt;This is a question of the programming model (as exposed to the application) versus implementation (as implemented by a particular data store).&lt;/p&gt;

&lt;p&gt;Exposing all transient states in the implementation (i.e. when elections are happening) will clutter all applications with boiler-plate copy&amp;amp;pasted code, which needs to be consistent with internal implementation state machine &amp;#8211; which can and will change in time.&lt;/p&gt;

&lt;p&gt;The &lt;a href=&quot;https://jira.opendaylight.org/browse/CONTROLLER-1483&quot; title=&quot;akka.pattern.AskTimeoutException on follower while BGP peer introduces 1M prefixes&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CONTROLLER-1483&quot;&gt;&lt;del&gt;CONTROLLER-1483&lt;/del&gt;&lt;/a&gt; rework does not change things in this area (except perhaps having misaligned timers, which will need revision).&lt;/p&gt;

&lt;p&gt;The only way to address this is to have add an alternative read() method, where the user can specify an upper bound on the request response (and report an equivalent of TimeoutException). This in turn will need figuring out how to specify this is the RESTCONF request (i.e. define an ODL extension query parameter) and have the RESTCONF implementation use the constrained read method.&lt;/p&gt;

&lt;p&gt;We cannot reasonably support this for modifications, simply because we cannot guarantee convergence in arbitrary time interval. Hence if an application were to specify an upper bound on write-type operations, the results reported to the application would not necessarily be consistent with what actually happened.&lt;/p&gt;

&lt;p&gt;In any case, we are past offset-0 M5, which means we cannot really deliver this in Carbon.&lt;/p&gt;</comment>
                            <comment id="39878" author="rovarga" created="Mon, 6 Mar 2017 10:58:47 +0000"  >&lt;p&gt;One more thing: &apos;upper bound&apos; in this context is obviously not a hard deadline, but rather a wish. For variety of reasons implementations can only guarantee a response &quot;soon after&quot; the deadline.&lt;/p&gt;</comment>
                            <comment id="39879" author="rovarga" created="Mon, 6 Mar 2017 11:43:54 +0000"  >&lt;p&gt;Actually, no change is needed in the APIs themselves: read() already returns a Future, hence all that is required is the extension and making RESTCONF pass an appropriate time constraint to get().&lt;/p&gt;</comment>
                            <comment id="64805" author="rovarga" created="Tue, 28 Aug 2018 00:00:55 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.opendaylight.org/secure/ViewProfile.jspa?name=jluhrsen&quot; class=&quot;user-hover&quot; rel=&quot;jluhrsen&quot;&gt;jluhrsen&lt;/a&gt; this reads like the AAA issue we fixed in Fluorine. Is this still happening?&lt;/p&gt;</comment>
                            <comment id="64807" author="tpantelis" created="Tue, 28 Aug 2018 00:07:20 +0000"  >&lt;p&gt;That fix just pushes the delay&#160;to the restconf read,&#160;which will still take 20s w/o a leader. This will get worse with tell-based as I believe the timeout after retries is 2 min.&lt;/p&gt;</comment>
                            <comment id="64851" author="jluhrsen" created="Fri, 31 Aug 2018 18:14:29 +0000"  >&lt;p&gt;well, I&apos;m not sure we are on the same page then. The last time I looked at this, I guess, was 1.5 years ago? Anyway,&lt;br/&gt;
going by my steps in the description I am seeing that there is no more response issue.&lt;/p&gt;

&lt;p&gt;1. kill the leader&lt;br/&gt;
2. kill another node&lt;br/&gt;
3. GET on /restconf/streams to the remaining node&lt;/p&gt;

&lt;p&gt;the result is a proper response (200) and data ( {&quot;streams&quot;:{}} )&lt;/p&gt;

&lt;p&gt;does it jive with what you guys expect?&lt;/p&gt;</comment>
                            <comment id="64852" author="tpantelis" created="Fri, 31 Aug 2018 18:25:21 +0000"  >&lt;p&gt;That&apos;s b/c&#160;/restconf/streams doesn&apos;t hit the DS. You saw this before due to the AAA issue as Robert alluded to. However it would still happen for a request that does actually access the DS - that&apos;s expected.&lt;/p&gt;

&lt;p&gt;If there&apos;s no further action here then please close it.&lt;/p&gt;</comment>
                            <comment id="64853" author="jluhrsen" created="Fri, 31 Aug 2018 18:28:32 +0000"  >&lt;p&gt;deal. nothing else here for me to worry about. closing.&lt;/p&gt;</comment>
                            <comment id="64854" author="jluhrsen" created="Fri, 31 Aug 2018 18:29:19 +0000"  >&lt;p&gt;resolved with &lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/73991/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/73991/&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>7892</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=7892]]></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|i01y1z:</customfieldvalue>

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