Code Review
/
controller.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Bug 3376: Add debug context for CDS transactions
[controller.git]
/
opendaylight
/
md-sal
/
sal-distributed-datastore
/
src
/
main
/
java
/
org
/
opendaylight
/
controller
/
cluster
/
datastore
/
TransactionProxy.java
diff --git
a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/TransactionProxy.java
b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/TransactionProxy.java
index eca930a03d89c3533f59dd441257197357b93bb4..e7a00042e4146c5ddc03a013e6eeda3198a38ea3 100644
(file)
--- a/
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/TransactionProxy.java
+++ b/
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/TransactionProxy.java
@@
-62,7
+62,8
@@
public class TransactionProxy extends AbstractDOMStoreTransaction<TransactionIde
@VisibleForTesting
public TransactionProxy(final AbstractTransactionContextFactory<?> txContextFactory, final TransactionType type) {
@VisibleForTesting
public TransactionProxy(final AbstractTransactionContextFactory<?> txContextFactory, final TransactionType type) {
- super(txContextFactory.nextIdentifier(), false);
+ super(txContextFactory.nextIdentifier(), txContextFactory.getActorContext().getDatastoreContext()
+ .isTransactionDebugContextEnabled());
this.txContextFactory = txContextFactory;
this.type = Preconditions.checkNotNull(type);
this.txContextFactory = txContextFactory;
this.type = Preconditions.checkNotNull(type);
@@
-255,7
+256,9
@@
public class TransactionProxy extends AbstractDOMStoreTransaction<TransactionIde
}
txContextFactory.onTransactionReady(getIdentifier(), ret.getCohortFutures());
}
txContextFactory.onTransactionReady(getIdentifier(), ret.getCohortFutures());
- return ret;
+
+ final Throwable debugContext = getDebugContext();
+ return debugContext == null ? ret : new DebugThreePhaseCommitCohort(getIdentifier(), ret, debugContext);
}
private AbstractThreePhaseCommitCohort<?> createSingleCommitCohort(final String shardName,
}
private AbstractThreePhaseCommitCohort<?> createSingleCommitCohort(final String shardName,