BUG-8027: do not break actor encapsulation 47/53747/2
authorRobert Varga <rovarga@cisco.com>
Thu, 23 Mar 2017 17:10:58 +0000 (18:10 +0100)
committerRobert Varga <rovarga@cisco.com>
Thu, 23 Mar 2017 17:17:21 +0000 (18:17 +0100)
commit4a9e1103eef316f18c4a14cfccb050bddc01564b
treece8be936c71dc1196d60f01d28c4971d591bb760
parent17a38939f6ba3cbbc1ff0f1f3e00b58f5002813d
BUG-8027: do not break actor encapsulation

Invoking abort() from ShardTransaction means we are executing code
from one actor in the context of another one and since the code path
involves persistence, this breaks Akka rather thoroughly.

Introduce a dedicated method for the required upcall and send a request
to persist separately.

Change-Id: Ic994b5e5963e8c602844e283f34df8bfa3726705
Signed-off-by: Robert Varga <rovarga@cisco.com>
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/AbstractShardDataTreeTransaction.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/Shard.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ShardDataTree.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ShardDataTreeTransactionChain.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ShardDataTreeTransactionParent.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ShardTransaction.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/PersistAbortTransactionPayload.java [new file with mode: 0644]
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ShardTransactionFailureTest.java

©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.