Hi Michael,
Thanks for your response. I am writing a custom cohort class for some
validation purpose, which extends the DOMDataTreeCommitCohort of the
mdsal.dom.api package and overrides the canCommit(). canCommit() in my cohort
does some validations and just return a Future object indicating success or
failure. I am NOT actually timing out the Future . Sometimes my cohort class
takes more than 5 seconds to execute and the MDSAL commit times-out. I suspect
that some classes in MDSAL are probably timing out the commit, since it is
exceeding the default timeout value of 5 seconds. But in my application, I can
wait for more than 5 seconds possibly around 20 seconds for doing the
validation. For this I want to know the code of the MDSAL which I can tweak for
setting a higher timeout value and use that code locally in my application.
"errors": {
"error": [
{
"error-type": "application",
"error-tag": "operation-failed",
"error-message": "canCommit encountered an unexpected failure",
"error-info": "java.util.concurrent.TimeoutException: Futures timed out
after [5 seconds]\n\tat
scala.concurrent.impl.Promise$DefaultPromise.ready(Promise.scala:219)\n\tat
scala.concurrent.impl.Promise$DefaultPromise.result(Promise.scala:223)\n\tat
scala.concurrent.Await$$anonfun$result$1.apply(package.scala:190)\n\tat
akka.dispatch.MonitorableThreadFactory$AkkaForkJoinWorkerThread$$anon$3.block(ThreadPoolBuilder.scala:167)\n\tat
scala.concurrent.forkjoin.ForkJoinPool.managedBlock(ForkJoinPool.java:3640)\n\tat
akka.dispatch.MonitorableThreadFactory$AkkaForkJoinWorkerThread.blockOn(ThreadPoolBuilder.scala:165)\n\tat
scala.concurrent.Await$.result(package.scala:190)\n\tat
scala.concurrent.Await.result(package.scala)\n\tat
org.opendaylight.controller.cluster.datastore.CompositeDataTreeCohort.processResponses(CompositeDataTreeCohort.java:162)\n\tat
org.opendaylight.controller.cluster.datastore.CompositeDataTreeCohort.canCommit(CompositeDataTreeCohort.java:122)\n\tat
org.opendaylight.controller.cluster.datastore.SimpleShardDataTreeCohort.userPreCommit(SimpleShardDataTreeCohort.java:162)\n\tat
org.opendaylight.controller.cluster.datastore.ShardDataTree.startPreCommit(ShardDataTree.java:584)\n\tat
org.opendaylight.controller.cluster.datastore.SimpleShardDataTreeCohort.preCommit(SimpleShardDataTreeCohort.java:91)\n\tat
org.opendaylight.controller.cluster.datastore.CohortEntry.preCommit(CohortEntry.java:102)\n\tat
org.opendaylight.controller.cluster.datastore.ShardCommitCoordinator.doCommit(ShardCommitCoordinator.java:296)\n\tat
org.opendaylight.controller.cluster.datastore.ShardCommitCoordinator.access$200(ShardCommitCoordinator.java:49)\n\tat
org.opendaylight.controller.cluster.datastore.ShardCommitCoordinator$2.onSuccess(ShardCommitCoordinator.java:243)\n\tat
org.opendaylight.controller.cluster.datastore.ShardCommitCoordinator$2.onSuccess(ShardCommitCoordinator.java:237)\n\tat
org.opendaylight.controller.cluster.datastore.SimpleShardDataTreeCohort.successfulCanCommit(SimpleShardDataTreeCohort.java:145)\n\tat
org.opendaylight.controller.cluster.datastore.ShardDataTree.processNextTransaction(ShardDataTree.java:526)\n\tat
org.opendaylight.controller.cluster.datastore.ShardDataTree.startCanCommit(ShardDataTree.java:560)\n\tat
org.opendaylight.controller.cluster.datastore.SimpleShardDataTreeCohort.canCommit(SimpleShardDataTreeCohort.java:81)\n\tat
org.opendaylight.controller.cluster.datastore.CohortEntry.canCommit(CohortEntry.java:98)\n\tat
org.opendaylight.controller.cluster.datastore.ShardCommitCoordinator.handleCanCommit(ShardCommitCoordinator.java:237)\n\tat
org.opendaylight.controller.cluster.datastore.ShardCommitCoordinator.handleReadyLocalTransaction(ShardCommitCoordinator.java:201)\n\tat
org.opendaylight.controller.cluster.datastore.Shard.handleReadyLocalTransaction(Shard.java:437)\n\tat
org.opendaylight.controller.cluster.datastore.Shard.handleNonRaftCommand(Shard.java:243)\n\tat
org.opendaylight.controller.cluster.raft.RaftActor.handleCommand(RaftActor.java:291)\n\tat
org.opendaylight.controller.cluster.common.actor.AbstractUntypedPersistentActor.onReceiveCommand(AbstractUntypedPersistentActor.java:29)\n\tat
akka.persistence.UntypedPersistentActor.onReceive(PersistentActor.scala:170)\n\tat
org.opendaylight.controller.cluster.common.actor.MeteringBehavior.apply(MeteringBehavior.java:97)\n\tat
akka.actor.ActorCell$$anonfun$become$1.applyOrElse(ActorCell.scala:544)\n\tat
akka.actor.Actor$class.aroundReceive(Actor.scala:484)\n\tat
akka.persistence.UntypedPersistentActor.akka$persistence$Eventsourced$$super$aroundReceive(PersistentActor.scala:168)\n\tat
akka.persistence.Eventsourced$$anon$1.stateReceive(Eventsourced.scala:633)\n\tat
akka.persistence.Eventsourced$class.aroundReceive(Eventsourced.scala:179)\n\tat
akka.persistence.UntypedPersistentActor.aroundReceive(PersistentActor.scala:168)\n\tat
akka.actor.ActorCell.receiveMessage(ActorCell.scala:526)\n\tat
akka.actor.ActorCell.invoke(ActorCell.scala:495)\n\tat
akka.dispatch.Mailbox.processMailbox(Mailbox.scala:257)\n\tat
akka.dispatch.Mailbox.run(Mailbox.scala:224)\n\tat
akka.dispatch.Mailbox.exec(Mailbox.scala:234)\n\tat
scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)\n\tat
scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)\n\tat
scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)\n\tat
scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)\n"
}
]
}
}
Regards
-Satish
From: Michael Vorburger [mailto:[email protected]]
Sent: Monday, May 15, 2017 8:10 PM
To: Satish Dutt <[email protected]>
Cc: [email protected]; [email protected]
Subject: Re: [mdsal-dev] How to increase the timeout value for a commit
operation to the data store ?
Satish,
On Mon, May 15, 2017 at 2:26 PM, Satish Dutt
<[email protected]<mailto:[email protected]>> wrote:
Hi,
Is there any way to increase the timeout value for a commit operation to the
datastore ? Sometimes I get timeout value during the commit operation
AFAIK, the 5s timeout you're experience below from a commit to the datastore is
probably not coming from mdsal (controller) code itself, but from something
using it .. if I were you I would look more at the code doing the commit - it
receives a Future in return, and some code in your application is probably
timing out on that Future - could that be?hh
Tx,
M.
--
Michael Vorburger, Red Hat
[email protected]<mailto:[email protected]> | IRC: vorburger @freenode |
~ = http://vorburger.ch<http://vorburger.ch/>
{
"errors": {
"error": [
{
"error-type": "application",
"error-tag": "operation-failed",
"error-message": "canCommit encountered an unexpected failure",
"error-info": "java.util.concurrent.TimeoutException: Futures timed out
after [5 seconds]\n\tat
scala.concurrent.impl.Promise$DefaultPromise.ready(Promise.scala:219)\n\tat
…
…
…
akka.dispatch.Mailbox.exec(Mailbox.scala:234)\n\tat
scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)\n\tat
scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)\n\tat
scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)\n\tat
scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)\n"
}
]
}
}
Regards
-Satish
_______________________________________________
mdsal-dev mailing list
[email protected]<mailto:[email protected]>
https://lists.opendaylight.org/mailman/listinfo/mdsal-dev
_______________________________________________
controller-dev mailing list
[email protected]
https://lists.opendaylight.org/mailman/listinfo/controller-dev