X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-distributed-datastore%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fdatabroker%2Factors%2Fdds%2FLocalProxyTransaction.java;h=576fa67ed467afc05fe871c1db424aa2a45eca17;hp=1dec84631a2904f6c7b528b737ec14579d7c6010;hb=a510fba141230ce9fe8301f9eb0198cc09df46ca;hpb=98d1c5606bad9633ce5549bcd691a98c75abdf6a diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/databroker/actors/dds/LocalProxyTransaction.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/databroker/actors/dds/LocalProxyTransaction.java index 1dec84631a..576fa67ed4 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/databroker/actors/dds/LocalProxyTransaction.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/databroker/actors/dds/LocalProxyTransaction.java @@ -29,10 +29,12 @@ import org.slf4j.LoggerFactory; * An {@link AbstractProxyTransaction} for dispatching a transaction towards a shard leader which is co-located with * the client instance. * + *

* It requires a {@link DataTreeSnapshot}, which is used to instantiated a new {@link DataTreeModification}. Operations * are then performed on this modification and once the transaction is submitted, the modification is sent to the shard * leader. * + *

* This class is not thread-safe as usual with transactions. Since it does not interact with the backend until the * transaction is submitted, at which point this class gets out of the picture, this is not a cause for concern. * @@ -87,13 +89,13 @@ final class LocalProxyTransaction extends AbstractProxyTransaction { @Override void doAbort() { - client().sendRequest(nextSequence(), new AbortLocalTransactionRequest(identifier, client().self()), ABORT_COMPLETER); + sendRequest(new AbortLocalTransactionRequest(identifier, localActor()), ABORT_COMPLETER); modification = new FailedDataTreeModification(() -> new IllegalStateException("Tracker has been aborted")); } @Override CommitLocalTransactionRequest doCommit(final boolean coordinated) { - final CommitLocalTransactionRequest ret = new CommitLocalTransactionRequest(identifier, client().self(), + final CommitLocalTransactionRequest ret = new CommitLocalTransactionRequest(identifier, localActor(), modification, coordinated); modification = new FailedDataTreeModification(() -> new IllegalStateException("Tracker has been submitted")); return ret;