Use TransactionCommitOperationTimeout when commiting a Local transaction 18/20918/1
authorMoiz Raja <moraja@cisco.com>
Thu, 21 May 2015 18:20:55 +0000 (11:20 -0700)
committerTom Pantelis <tpanteli@brocade.com>
Thu, 21 May 2015 19:05:10 +0000 (19:05 +0000)
This is to make this similar to how we do a remote transaction. The transaction
commit timeout is much larger than the operation timeout and is more appropriate
for committing because the latencies involved in committing are much larger as
committing involves replication which could sometimes be pretty slow.

Change-Id: Ie76e05bf875b4ea5eee9618519d7167f50671c8f
Signed-off-by: Moiz Raja <moraja@cisco.com>
(cherry picked from commit 3ca4e8353a32a68ebf71e98fed1954af5c419ca3)

opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/LocalThreePhaseCommitCohort.java

index 0ea1029..267513f 100644 (file)
@@ -48,7 +48,7 @@ abstract class LocalThreePhaseCommitCohort implements DOMStoreThreePhaseCommitCo
     private Future<Object> initiateCommit(final boolean immediate) {
         final ReadyLocalTransaction message = new ReadyLocalTransaction(transaction.getIdentifier().toString(),
                 modification, immediate);
-        return actorContext.executeOperationAsync(leader, message);
+        return actorContext.executeOperationAsync(leader, message, actorContext.getTransactionCommitOperationTimeout());
     }
 
     Future<ActorSelection> initiateCoordinatedCommit() {

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.