<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 19:53:55 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-808] Clustering : Exception on recovery Cache loader returning null for key</title>
                <link>https://jira.opendaylight.org/browse/CONTROLLER-808</link>
                <project id="10113" key="CONTROLLER">controller</project>
                    <description>&lt;p&gt;These exceptions are seen on recovery which are preventing recovery from happening.&lt;/p&gt;

&lt;p&gt;2014-09-11 02:59:09,916 | WARN  | lt-dispatcher-18 | ShardManager                     | 152 - com.typesafe.akka.slf4j - 2.3.4 | akka://opendaylight-cluster-data/user/shardmanager-config | Supervisor Strategy of resume applied&lt;br/&gt;
        at com.google.common.cache.LocalCache$Segment.getAndRecordStats(LocalCache.java:2412)&lt;br/&gt;
        at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2380)&lt;br/&gt;
        at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2342)&lt;br/&gt;
        at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2257)&lt;br/&gt;
        at com.google.common.cache.LocalCache.get(LocalCache.java:4000)&lt;br/&gt;
        at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:4004)&lt;br/&gt;
        at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4874)&lt;br/&gt;
        at org.opendaylight.yangtools.yang.data.impl.schema.tree.DataNodeContainerModificationStrategy.getChild(DataNodeContainerModificationStrategy.java:81)&lt;br/&gt;
        at org.opendaylight.yangtools.yang.data.impl.schema.tree.DataNodeContainerModificationStrategy$ContainerModificationStrategy.getChild(DataNodeContainerModificationStrategy.java:119)&lt;br/&gt;
        at org.opendaylight.yangtools.yang.data.impl.schema.tree.RootModificationApplyOperation.getChild(RootModificationApplyOperation.java:66)&lt;br/&gt;
        at org.opendaylight.yangtools.yang.data.impl.schema.tree.TreeNodeUtils.findNodeChecked(TreeNodeUtils.java:53)&lt;br/&gt;
        at org.opendaylight.yangtools.yang.data.impl.schema.tree.InMemoryDataTreeModification.resolveModificationStrategy(InMemoryDataTreeModification.java:137)&lt;br/&gt;
        at org.opendaylight.yangtools.yang.data.impl.schema.tree.InMemoryDataTreeModification.resolveModificationFor(InMemoryDataTreeModification.java:143)&lt;br/&gt;
        at org.opendaylight.yangtools.yang.data.impl.schema.tree.InMemoryDataTreeModification.merge(InMemoryDataTreeModification.java:73)&lt;br/&gt;
        at org.opendaylight.controller.md.sal.dom.store.impl.SnapshotBackedWriteTransaction.merge(SnapshotBackedWriteTransaction.java:85)&lt;br/&gt;
        at org.opendaylight.controller.cluster.datastore.modification.MergeModification.apply(MergeModification.java:37)&lt;br/&gt;
        at org.opendaylight.controller.cluster.datastore.modification.MutableCompositeModification.apply(MutableCompositeModification.java:33)&lt;br/&gt;
        at org.opendaylight.controller.cluster.datastore.Shard.commit(Shard.java:330)&lt;br/&gt;
        at org.opendaylight.controller.cluster.datastore.Shard.applyState(Shard.java:444)&lt;br/&gt;
        at org.opendaylight.controller.cluster.raft.RaftActor.onReceiveRecover(RaftActor.java:151)&lt;br/&gt;
        at org.opendaylight.controller.cluster.datastore.Shard.onReceiveRecover(Shard.java:175)&lt;br/&gt;
        at akka.persistence.UntypedPersistentActor$$anonfun$receiveRecover$1.applyOrElse(Eventsourced.scala:433)&lt;br/&gt;
        at scala.runtime.AbstractPartialFunction$mcVL$sp.apply$mcVL$sp(AbstractPartialFunction.scala:33)&lt;br/&gt;
        at scala.runtime.AbstractPartialFunction$mcVL$sp.apply(AbstractPartialFunction.scala:33)&lt;br/&gt;
        at scala.runtime.AbstractPartialFunction$mcVL$sp.apply(AbstractPartialFunction.scala:25)&lt;br/&gt;
        at akka.persistence.Eventsourced$$anonfun$akka$persistence$Eventsourced$$recoveryBehavior$1.applyOrElse(Eventsourced.scala:168)&lt;br/&gt;
        at akka.persistence.Recovery$State$$anonfun$processPersistent$1.apply(Recovery.scala:33)&lt;br/&gt;
        at akka.persistence.Recovery$State$$anonfun$processPersistent$1.apply(Recovery.scala:33)&lt;br/&gt;
        at akka.persistence.Recovery$class.withCurrentPersistent(Recovery.scala:176)&lt;br/&gt;
        at akka.persistence.UntypedPersistentActor.withCurrentPersistent(Eventsourced.scala:428)&lt;br/&gt;
        at akka.persistence.Recovery$State$class.processPersistent(Recovery.scala:33)&lt;br/&gt;
        at akka.persistence.Recovery$$anon$1.processPersistent(Recovery.scala:95)&lt;br/&gt;
        at akka.persistence.Recovery$$anon$1.aroundReceive(Recovery.scala:101)&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$1.aroundReceive(Eventsourced.scala:35)&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;br/&gt;
2014-09-11 02:59:09,916 | WARN  | lt-dispatcher-18 | OneForOneStrategy                | 152 - com.typesafe.akka.slf4j - 2.3.4 | akka://opendaylight-cluster-data/user/shardmanager-config/member-3-shard-default-config | CacheLoader returned null for key (urn:opendaylight:params:xml:ns:yang:controller:config:sal-clustering-it:car-people?revision=2014-08-18)car-people.&lt;/p&gt;</description>
                <environment>&lt;p&gt;Operating System: Mac OS&lt;br/&gt;
Platform: PC&lt;/p&gt;</environment>
        <key id="25362">CONTROLLER-808</key>
            <summary>Clustering : Exception on recovery Cache loader returning null for key</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="moraja@cisco.com">Moiz Raja</assignee>
                                    <reporter username="moraja@cisco.com">Moiz Raja</reporter>
                        <labels>
                    </labels>
                <created>Thu, 11 Sep 2014 14:48:58 +0000</created>
                <updated>Sat, 20 Sep 2014 18:29:43 +0000</updated>
                            <resolved>Sat, 20 Sep 2014 18:29:43 +0000</resolved>
                                    <version>Helium</version>
                                                    <component>mdsal</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>5</watches>
                                                                                                                <comments>
                            <comment id="49120" author="tony.tkacik@gmail.com" created="Tue, 16 Sep 2014 08:10:47 +0000"  >&lt;p&gt;Schema for data you are trying to write is not loaded at time you are writing it.&lt;/p&gt;</comment>
                            <comment id="49121" author="moraja@cisco.com" created="Tue, 16 Sep 2014 10:44:22 +0000"  >&lt;p&gt;On recovery we try to read from the disk and apply the modification that we have recorded to the state which is in InMemoryDataStore. We start recovery only after the first SchemaContext update is received. It looks like if the schema context with the appropriate schema is not present when we are recovering this failure can occur. How do we get around this?&lt;/p&gt;</comment>
                            <comment id="49122" author="tony.tkacik@gmail.com" created="Tue, 16 Sep 2014 10:57:41 +0000"  >&lt;p&gt;Naive approach (not knowing what is in datastore):&lt;/p&gt;

&lt;p&gt;You need to store also list of YANG modules (namespaces) from schema context when snapshot was stored to disk and you could do full recovery (using inmemory data store) only when schema context contains all modules.&lt;/p&gt;

&lt;p&gt;More advanced approach is to know all used namespaces (stored data) and do recovery after all modules are present, but this requires bit more logic on&lt;br/&gt;
writeout path and needs to store all used namespaces (even ones used in identities and instance identifiers stored in leaves).&lt;/p&gt;</comment>
                            <comment id="49123" author="moraja@cisco.com" created="Tue, 16 Sep 2014 11:14:52 +0000"  >&lt;p&gt;For persistence/recovery we are using akka-persistence. If we had to store schema related info using akka-persistence then we would need to recover first to get to the schema, which would also recover the data. &lt;/p&gt;

&lt;p&gt;To recover conditionally based on the presence of all required schema elements would therefore require us to go outside the bounds of akka-persistence.&lt;/p&gt;

&lt;p&gt;One possible solution I can think of is if schemaContext itself was serializable. If so that could be one proper alternative that we could use for recovery. Essentially it would work like this, when we receive a schemaContext during a normal run we would persist it to disk (using akka-persistence). On recovery we would load the schemaContext from disk and apply it to the in-memory store and then subsequently load the data. This seems like the most straightforward approach (if schemaContext was serializable that is)&lt;/p&gt;</comment>
                            <comment id="49124" author="moraja@cisco.com" created="Wed, 17 Sep 2014 10:34:57 +0000"  >&lt;p&gt;Let&apos;s say I had some data in the datastore for some module and later on I set a schema context on the datastore which did not contain a definition for that module. What would happen? Would it not be possible to retrieve that data from the datastore?&lt;/p&gt;</comment>
                            <comment id="49125" author="tpantelis" created="Fri, 19 Sep 2014 02:39:15 +0000"  >&lt;p&gt;I think the way SchemaContext works is problematic. At my previous company, we had a similar issue with failures caused by data model schemas not being present yet on restart so I preloaded all data model schemas from all bundles on restart by having a component that started first and scraped the schema-related files from all RESOLVED bundles. I think, longer term, we should do a similar thing with the SchemaContext so we don&apos;t have to keep putting in hacks like this.&lt;/p&gt;</comment>
                            <comment id="49126" author="moraja@cisco.com" created="Fri, 19 Sep 2014 04:03:57 +0000"  >&lt;p&gt;Tom, I agree in principle with your point - but for Helium we do need to hack this.&lt;/p&gt;</comment>
                            <comment id="49127" author="tpantelis" created="Fri, 19 Sep 2014 05:30:57 +0000"  >&lt;p&gt;Yeah I know - this should be investigated post-Helium.&lt;/p&gt;</comment>
                            <comment id="49128" author="tony.tkacik@gmail.com" created="Fri, 19 Sep 2014 08:40:47 +0000"  >&lt;p&gt;GlobalBundleScanningSchemaServiceImpl is one which exactly does that - gets schema sources from all resolved bundles.&lt;/p&gt;

&lt;p&gt;If I understand you correctly, what you are proposing is having component,&lt;br/&gt;
which behaves as GlobalBundleScanningSchemaServiceImpl, but also caches schemas, so on subsequent restart (if nothing changed) it has all schemas&lt;br/&gt;
ready at start?&lt;/p&gt;

&lt;p&gt;Actually this &quot;hack&quot; what I am proposing is also correct one, image some model bundles were unistalled, so still comparing schema context capabilities is still required (basicly because of restart and reinstall capabilities of your system changed). &lt;/p&gt;

&lt;p&gt;So yes, we need better heuristics how to recover datastore in various scenarios, which should be part of Lithium and also maybe Helium Service Release.&lt;/p&gt;</comment>
                            <comment id="49129" author="tpantelis" created="Fri, 19 Sep 2014 12:55:58 +0000"  >&lt;p&gt;Moiz&apos;s hack should work fine for now except if a module bundle is removed from the installation. On restart, the persisted modules set would contain a stale module and the modules in the new SchemaContext wouldn&apos;t &quot;containAll&quot; persisted modules so we wouldn&apos;t start the shards. But that would be uncommon so maybe we can live with it for now.&lt;/p&gt;

&lt;p&gt;It looks like it&apos;s the ModuleInfoBundleTracker that backs the SchemaContext. Currently it tracks ACTIVE bundles. I think if we changed it to track RESOLVED bundles, like GlobalBundleScanningSchemaServiceImpl does, it might fix this problem w/o having to do the hack. I wouldn&apos;t think there would be any adverse ramifications to this.&lt;/p&gt;

&lt;p&gt;What do you guys think?&lt;/p&gt;

&lt;p&gt;(In reply to Tony Tkacik from comment #9)&lt;br/&gt;
&amp;gt; GlobalBundleScanningSchemaServiceImpl is one which exactly does that - gets&lt;br/&gt;
&amp;gt; schema sources from all resolved bundles.&lt;br/&gt;
&amp;gt; &lt;br/&gt;
&amp;gt; If I understand you correctly, what you are proposing is having component,&lt;br/&gt;
&amp;gt; which behaves as GlobalBundleScanningSchemaServiceImpl, but also caches&lt;br/&gt;
&amp;gt; schemas, so on subsequent restart (if nothing changed) it has all schemas&lt;br/&gt;
&amp;gt; ready at start?&lt;br/&gt;
&amp;gt; &lt;br/&gt;
&amp;gt; Actually this &quot;hack&quot; what I am proposing is also correct one, image some&lt;br/&gt;
&amp;gt; model bundles were unistalled, so still comparing schema context&lt;br/&gt;
&amp;gt; capabilities is still required (basicly because of restart and reinstall&lt;br/&gt;
&amp;gt; capabilities of your system changed). &lt;br/&gt;
&amp;gt; &lt;br/&gt;
&amp;gt; So yes, we need better heuristics how to recover datastore in various&lt;br/&gt;
&amp;gt; scenarios, which should be part of Lithium and also maybe Helium Service&lt;br/&gt;
&amp;gt; Release.&lt;/p&gt;</comment>
                            <comment id="49130" author="moraja@cisco.com" created="Fri, 19 Sep 2014 14:38:38 +0000"  >&lt;p&gt;Tom, I&apos;m not sure what would be the impact of that change - I wouldn&apos;t want to introduce it in Helium.&lt;/p&gt;

&lt;p&gt;From observation it does NOT seem that on startup schemaContext gets injected more than once most of the times. At exit however I see it being injected several times - I haven&apos;t investigated why yet.&lt;/p&gt;</comment>
                            <comment id="49131" author="tpantelis" created="Fri, 19 Sep 2014 15:32:31 +0000"  >&lt;p&gt;The config system starts modules async so many if not all bundles will have transitioned to ACTIVE at that point. But, of course, it depends on timing and is unpredictable. On shutdown, as module bundles are stopped, I believed they&apos;re removed from the SchemaContext - that would explain why you see updates. If so, that shouldn&apos;t screw up your changes because newModules wouldn&apos;t &quot;containAll&quot; knownModules so we wouldn&apos;t update the persistence.&lt;/p&gt;

&lt;p&gt;I understand your reservations about changing the module schema loading at this point. But it seems like it would be a benign change - I&apos;d be interested in Tony&apos;s opinion. We can always change it post-Helium when there&apos;s more time to let it bake. Removing your &quot;hack&quot; should be simple. &lt;/p&gt;

&lt;p&gt;(In reply to Moiz Raja from comment #11)&lt;br/&gt;
&amp;gt; Tom, I&apos;m not sure what would be the impact of that change - I wouldn&apos;t want&lt;br/&gt;
&amp;gt; to introduce it in Helium.&lt;br/&gt;
&amp;gt; &lt;br/&gt;
&amp;gt; From observation it does NOT seem that on startup schemaContext gets&lt;br/&gt;
&amp;gt; injected more than once most of the times. At exit however I see it being&lt;br/&gt;
&amp;gt; injected several times - I haven&apos;t investigated why yet.&lt;/p&gt;</comment>
                            <comment id="49132" author="moraja@cisco.com" created="Sat, 20 Sep 2014 18:29:43 +0000"  >&lt;p&gt;&lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/11346/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/11346/&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>1815</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=1815]]></customfieldvalue>

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

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

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

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