<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 19:55:44 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>[CONTROLLER-1512] sal-akka-raft: Use akka.dispatch.ControlMessage for messages</title>
                <link>https://jira.opendaylight.org/browse/CONTROLLER-1512</link>
                <project id="10113" key="CONTROLLER">controller</project>
                    <description>&lt;p&gt;RaftActor implements time-sensitive messaging exchange, but it is also subclassed to provide subclass operations.&lt;/p&gt;

&lt;p&gt;When the subclass is targeted with a lot of messages, this can lead to timeouts in the RAFT underlay &amp;#8211; hence potentially disrupting stability.&lt;/p&gt;

&lt;p&gt;Akka provides a way to divide classes into two:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;make important messages implement akka.dispatch.ControlMessage&lt;/li&gt;
	&lt;li&gt;use one of ControlAwareMailboxes&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;ControlAwareMailboxes use two internal queues, giving priority to delivering messages which are instanceof ControlMessage and delivering other messages only when no ControlMessage is present.&lt;/p&gt;

&lt;p&gt;This way we can ensure that the RAFT algorithm operates isolated from any floods incurred by the implementation above, leading to better stability.&lt;/p&gt;

&lt;p&gt;Performance impact and interactions with persistence need to be evaluated before this becomes our default.&lt;/p&gt;</description>
                <environment>&lt;p&gt;Operating System: All&lt;br/&gt;
Platform: All&lt;/p&gt;</environment>
        <key id="26066">CONTROLLER-1512</key>
            <summary>sal-akka-raft: Use akka.dispatch.ControlMessage for messages</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="tpantelis">Tom Pantelis</assignee>
                                    <reporter username="rovarga">Robert Varga</reporter>
                        <labels>
                    </labels>
                <created>Mon, 18 Apr 2016 15:13:52 +0000</created>
                <updated>Tue, 25 Jul 2023 08:24:09 +0000</updated>
                            <resolved>Mon, 5 Jun 2017 14:59:39 +0000</resolved>
                                                                    <component>clustering</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="51412" author="muthukumaran.k@ericsson.com" created="Thu, 21 Apr 2016 07:08:22 +0000"  >&lt;p&gt;HI Robert, &lt;/p&gt;

&lt;p&gt;This implies that the order would be altered when compared to current order of delivery to Shard. &lt;/p&gt;

&lt;p&gt;Would there  be any changes in functional behavior due to this alteration of order? For instance, transaction-related messages (non-RAFT) of shard get reordered with replication related (RAFT) messages &lt;/p&gt;

&lt;p&gt;Regards&lt;br/&gt;
Muthu&lt;/p&gt;</comment>
                            <comment id="51413" author="rovarga" created="Thu, 21 Apr 2016 10:16:07 +0000"  >&lt;p&gt;The ordering does not really matter, as the messages are inherently coming from two unrelated sources: applications and RAFT peers.&lt;/p&gt;

&lt;p&gt;As discussed on this week&apos;s call, it actually makes sense to make RaftActor a completely separate actor, with Shard being just talking to it using messages.&lt;/p&gt;

&lt;p&gt;There is not an issue for that, but if Ashutosh does not open one by Friday, I will open it myself (and make this issue blocked by that one).&lt;/p&gt;

&lt;p&gt;Even when we separate the two actors, the interchange is logically split into two classes:&lt;/p&gt;

&lt;p&gt;RaftActor &amp;lt;-&amp;gt; RaftActor: ControlMessages, since RAFT convergence is the top priority:&lt;/p&gt;

&lt;p&gt;Shard -&amp;gt; RaftActor: normal message, just a request to persist a Payload&lt;/p&gt;

&lt;p&gt;RaftActor -&amp;gt; Shard: ControlMessages, as these propagate role (Leader/Follower) and we do not want to reorder w.r.t. responses to Payload persistence&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;-&amp;gt; Shard: normal messages, as these are work items which generate code and therefore need to be subject to backpressure when RAFT is in flux and cannot keep up. Most notably this will favor delivering Payload response messages before client requests, because without them the system is not making forward progres.&lt;/li&gt;
&lt;/ul&gt;
</comment>
                            <comment id="51414" author="tpantelis" created="Tue, 23 May 2017 19:44:04 +0000"  >&lt;p&gt;Currently we use the SingleConsumerOnlyUnboundedMailbox for shards which is a &quot;high-performance, multiple producer&#8212;single consumer, unbounded MailboxType&quot;. But it also says &quot;Currently this queue is slower for some benchmarks than the ConcurrentLinkedQueue from JDK 8 that is used by default, so be sure to measure the performance in your particular setting in order to determine which one to use.&quot;&lt;/p&gt;

&lt;p&gt;To switch to a ControlAwareMailbox, it looks like we&apos;d go with the UnboundedControlAwareMailbox (I don&apos;t see any other option other than BoundedControlAwareMailbox). Looking at the scala code for UnboundedControlAwareMailbox.MessageQueue:&lt;/p&gt;

&lt;p&gt;object UnboundedControlAwareMailbox {&lt;br/&gt;
  class MessageQueue extends UnboundedControlAwareMessageQueueSemantics with java.io.Serializable &lt;/p&gt;
{
    val controlQueue: Queue[Envelope] = new ConcurrentLinkedQueue[Envelope]()
    val queue: Queue[Envelope] = new ConcurrentLinkedQueue[Envelope]()
  }
&lt;p&gt;}&lt;/p&gt;

&lt;p&gt;it uses ConcurrentLinkedQueue for both queues. There&apos;s slight overhead to check if the Envelope is a ControlMessage but that looks negligible. &lt;/p&gt;

&lt;p&gt;We can add the configuration with a knob in the akka.conf to select which mailbox to use for shards.&lt;/p&gt;</comment>
                            <comment id="51415" author="tpantelis" created="Wed, 24 May 2017 16:35:45 +0000"  >&lt;p&gt;Patches: &lt;a href=&quot;https://git.opendaylight.org/gerrit/#/q/status:open+project:controller+branch:master+topic:bug/5740&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/q/status:open+project:controller+branch:master+topic:bug/5740&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="51416" author="rovarga" created="Mon, 5 Jun 2017 14:59:39 +0000"  >&lt;p&gt;This should help &lt;a href=&quot;https://jira.opendaylight.org/browse/CONTROLLER-1675&quot; title=&quot;Leadership transfer failed: Follower is not ready to become leader&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CONTROLLER-1675&quot;&gt;CONTROLLER-1675&lt;/a&gt; too.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10000">
                    <name>Blocks</name>
                                            <outwardlinks description="blocks">
                                        <issuelink>
            <issuekey id="26067">CONTROLLER-1513</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="26229">CONTROLLER-1675</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </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_10208" key="com.atlassian.jira.plugin.system.customfieldtypes:textfield">
                        <customfieldname>External issue ID</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>5740</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=5740]]></customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10204" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>ODL SR Target Milestone</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10320"><![CDATA[Nitrogen]]></customfieldvalue>

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

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