<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 19:54:25 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-996] Clustering : Exception thrown in Shard because a transaction was created on a chain when previous transaction was not yet ready</title>
                <link>https://jira.opendaylight.org/browse/CONTROLLER-996</link>
                <project id="10113" key="CONTROLLER">controller</project>
                    <description>&lt;p&gt;2014-10-31 11:29:44,814 | WARN  | lt-dispatcher-42 | ShardManager                     | 248 - com.typesafe.akka.slf4j - 2.3.4 | Supervisor Strategy of resume applied&lt;br/&gt;
        at com.google.common.base.Preconditions.checkState(Preconditions.java:176)&lt;br/&gt;
        at org.opendaylight.controller.md.sal.dom.store.impl.DOMStoreTransactionChainImpl$Allocated.getSnapshot(DOMStoreTransactionChainImpl.java:68)&lt;br/&gt;
        at org.opendaylight.controller.md.sal.dom.store.impl.DOMStoreTransactionChainImpl.getSnapshot(DOMStoreTransactionChainImpl.java:111)&lt;br/&gt;
        at org.opendaylight.controller.md.sal.dom.store.impl.DOMStoreTransactionChainImpl.newReadWriteTransaction(DOMStoreTransactionChainImpl.java:131)&lt;br/&gt;
        at org.opendaylight.controller.cluster.datastore.Shard.createTypedTransactionActor(Shard.java:508)&lt;br/&gt;
        at org.opendaylight.controller.cluster.datastore.Shard.createTransaction(Shard.java:543)&lt;br/&gt;
        at org.opendaylight.controller.cluster.datastore.Shard.createTransaction(Shard.java:530)&lt;br/&gt;
        at org.opendaylight.controller.cluster.datastore.Shard.handleCreateTransaction(Shard.java:441)&lt;br/&gt;
        at org.opendaylight.controller.cluster.datastore.Shard.onReceiveCommand(Shard.java:240)&lt;br/&gt;
        at akka.persistence.UntypedPersistentActor.onReceive(Eventsourced.scala:430)&lt;br/&gt;
        at org.opendaylight.controller.cluster.common.actor.MeteringBehavior.apply(MeteringBehavior.java:96)&lt;br/&gt;
        at akka.actor.ActorCell$$anonfun$become$1.applyOrElse(ActorCell.scala:534)&lt;br/&gt;
        at akka.persistence.Recovery$State$class.process(Recovery.scala:30)&lt;br/&gt;
        at akka.persistence.ProcessorImpl$$anon$2.process(Processor.scala:103)&lt;br/&gt;
        at akka.persistence.ProcessorImpl$$anon$2.aroundReceive(Processor.scala:114)&lt;br/&gt;
        at akka.persistence.Recovery$class.aroundReceive(Recovery.scala:256)&lt;br/&gt;
        at akka.persistence.UntypedPersistentActor.akka$persistence$Eventsourced$$super$aroundReceive(Eventsourced.scala:428)&lt;br/&gt;
        at akka.persistence.Eventsourced$$anon$2.doAroundReceive(Eventsourced.scala:82)&lt;br/&gt;
        at akka.persistence.Eventsourced$$anon$2.aroundReceive(Eventsourced.scala:78)&lt;br/&gt;
        at akka.persistence.Eventsourced$class.aroundReceive(Eventsourced.scala:369)&lt;br/&gt;
        at akka.persistence.UntypedPersistentActor.aroundReceive(Eventsourced.scala:428)&lt;br/&gt;
        at akka.actor.ActorCell.receiveMessage(ActorCell.scala:516)&lt;br/&gt;
        at akka.actor.ActorCell.invoke(ActorCell.scala:487)&lt;br/&gt;
        at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:238)&lt;br/&gt;
        at akka.dispatch.Mailbox.run(Mailbox.scala:220)&lt;br/&gt;
        at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:393)&lt;br/&gt;
        at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)&lt;br/&gt;
        at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)&lt;br/&gt;
        at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)&lt;br/&gt;
        at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)&lt;/p&gt;


&lt;p&gt;2014-10-31 11:29:44,815 | WARN  | lt-dispatcher-42 | OneForOneStrategy                | 248 - com.typesafe.akka.slf4j - 2.3.4 | Previous transaction member-1-shard-inventory-operational-40 is not ready yet&lt;/p&gt;</description>
                <environment>&lt;p&gt;Operating System: All&lt;br/&gt;
Platform: All&lt;/p&gt;</environment>
        <key id="25550">CONTROLLER-996</key>
            <summary>Clustering : Exception thrown in Shard because a transaction was created on a chain when previous transaction was not yet ready</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="moraja@cisco.com">Moiz Raja</reporter>
                        <labels>
                    </labels>
                <created>Wed, 5 Nov 2014 01:35:34 +0000</created>
                <updated>Tue, 25 Jul 2023 08:24:18 +0000</updated>
                            <resolved>Sat, 15 Nov 2014 15:45:01 +0000</resolved>
                                                                    <component>mdsal</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="49715" author="tpantelis" created="Wed, 5 Nov 2014 18:04:41 +0000"  >&lt;p&gt;I think the Tx chain is coming from the FlowCapableInventoryProvider and this error is related to &lt;a href=&quot;https://jira.opendaylight.org/browse/CONTROLLER-997&quot; title=&quot;Clustering : Occasional failure to create transactions during single node integration test&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CONTROLLER-997&quot;&gt;&lt;del&gt;CONTROLLER-997&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The FlowCapableInventoryProvider uses a Tx chain to continuously batch and submit modification operations on a separate thread. After it submits a Tx batch, it creates a new read-write Tx from the chain and starts a new batch. It does not wait for the Future from the the previous Tx to complete. This is valid.  The semantics of a Tx chain are such that the modifications from a previously submitted Tx in the chain are visible to the next Tx without the client having to wait for the previous Tx to be committed. So as soon as the previous Tx is readied, the next Tx can be created and its snapshot will contain the modifications made by the previous Tx.&lt;/p&gt;

&lt;p&gt;With the IMDS, i.e. w/o clustering, Tx&apos;s are readied synchronously and then submitted on a thread to be committed. However with the CDS, Tx&apos;s are readied async, i.e. the TransactionProxy sends a message to the ShardTransaction actor. So I think it&apos;s this timing difference that can cause issues with Tx chains and break the semantics.&lt;/p&gt;

&lt;p&gt;Here&apos;s a scenario that can break with the CDS:&lt;/p&gt;

&lt;p&gt;ReadWriteTransaction tx1 = txChain.newReadWriteTransaction()&lt;br/&gt;
tx1.write(id1, path1);&lt;br/&gt;
tx1.submit();&lt;/p&gt;

&lt;p&gt;ReadWriteTransaction tx2 = txChain.newReadWriteTransaction()&lt;br/&gt;
tx2.write(id2, path2);&lt;/p&gt;

&lt;p&gt;On tx.submit(), the ready operation is done async and may not complete before tx2 is created. If so, tx2 creation fails. With the IMDS, tx1 is readied when submit returns to the caller so this issue does not occur.&lt;/p&gt;

&lt;p&gt;In the CDS, we need to ensure the previous Tx in a chain completes its ready operation before it attempts to create the next Tx.&lt;/p&gt;

&lt;p&gt;I think this is the root cause of &lt;a href=&quot;https://jira.opendaylight.org/browse/CONTROLLER-997&quot; title=&quot;Clustering : Occasional failure to create transactions during single node integration test&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CONTROLLER-997&quot;&gt;&lt;del&gt;CONTROLLER-997&lt;/del&gt;&lt;/a&gt;. In the ex trace in 2319, the Tx create timed out. This ex appears to be the root cause - it was thrown back to akka which doesn&apos;t propagate it. Also, this ex incurred at 11:29:44 and the ex in 2319 occurred at 11:29:49, the latter being 5 seconds after which is the ask time out.&lt;/p&gt;

&lt;p&gt;This issue may also be the cause of &lt;a href=&quot;https://jira.opendaylight.org/browse/CONTROLLER-998&quot; title=&quot;OptimisticLockFailed exception when writing inventory and topology data&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CONTROLLER-998&quot;&gt;&lt;del&gt;CONTROLLER-998&lt;/del&gt;&lt;/a&gt; as well.&lt;/p&gt;</comment>
                            <comment id="49716" author="tpantelis" created="Thu, 6 Nov 2014 00:25:28 +0000"  >&lt;p&gt;&lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/12535/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/12535/&lt;/a&gt; for master&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/12537/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/12537/&lt;/a&gt; for Helium.&lt;/p&gt;</comment>
                            <comment id="49717" author="tpantelis" created="Sat, 8 Nov 2014 05:35:00 +0000"  >&lt;p&gt;Submitted follow-up patch &lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/12582/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/12582/&lt;/a&gt; to master.&lt;/p&gt;

&lt;p&gt;Need to cherry pick to stable/helium so keeping this bug open for now.&lt;/p&gt;</comment>
                            <comment id="49718" author="tpantelis" created="Sat, 15 Nov 2014 15:45:01 +0000"  >&lt;p&gt;Merged follow-up patch &lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/12878/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/12878/&lt;/a&gt; to helium&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10000">
                    <name>Blocks</name>
                                            <outwardlinks description="blocks">
                                        <issuelink>
            <issuekey id="25570">CONTROLLER-1016</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is blocked by">
                                        <issuelink>
            <issuekey id="25560">CONTROLLER-1006</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="25561">CONTROLLER-1007</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </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>2318</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=2318]]></customfieldvalue>

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

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

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