X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-distributed-datastore%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fdatastore%2FLocalThreePhaseCommitCohort.java;h=442e2f3b4dd77c88cfb3b57e868f5f5ed0a4d4fc;hb=3f979acfb60c2ffb1ce70c5475bdfce8f8e7df01;hp=569bacceaa8f600f4110ddafb106f34dbccac881;hpb=bea73749199179ffc19184c717dd4c585185ccb7;p=controller.git diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/LocalThreePhaseCommitCohort.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/LocalThreePhaseCommitCohort.java index 569bacceaa..442e2f3b4d 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/LocalThreePhaseCommitCohort.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/LocalThreePhaseCommitCohort.java @@ -12,6 +12,7 @@ import akka.dispatch.Futures; import akka.dispatch.OnComplete; import com.google.common.base.Preconditions; import com.google.common.util.concurrent.ListenableFuture; +import javax.annotation.Nonnull; import org.opendaylight.controller.cluster.datastore.identifiers.TransactionIdentifier; import org.opendaylight.controller.cluster.datastore.messages.CommitTransactionReply; import org.opendaylight.controller.cluster.datastore.messages.ReadyLocalTransaction; @@ -66,8 +67,12 @@ class LocalThreePhaseCommitCohort implements DOMStoreThreePhaseCommitCohort { return actorContext.executeOperationAsync(leader, message, actorContext.getTransactionCommitOperationTimeout()); } - void setOperationError(Exception operationError) { - this.operationError = operationError; + void setOperationError(@Nonnull Exception operationError) { + if (this.operationError != null) { + LOG.info("Cohort {} already had operation error", this, this.operationError); + } + + this.operationError = Preconditions.checkNotNull(operationError); } Future initiateCoordinatedCommit() {