Code Review
/
controller.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Merge "Moved the resources to a separate plugin so they can be used by others."
[controller.git]
/
opendaylight
/
md-sal
/
sal-distributed-datastore
/
src
/
main
/
java
/
org
/
opendaylight
/
controller
/
cluster
/
datastore
/
ThreePhaseCommitCohortProxy.java
diff --git
a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ThreePhaseCommitCohortProxy.java
b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ThreePhaseCommitCohortProxy.java
index 915b13dd8bc234a6cbf898658b8e6479333b36c2..5b447943ea7fd798e5572e55483ff8b4fcf7e331 100644
(file)
--- a/
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ThreePhaseCommitCohortProxy.java
+++ b/
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ThreePhaseCommitCohortProxy.java
@@
-59,17
+59,22
@@
public class ThreePhaseCommitCohortProxy implements
}
@Override public ListenableFuture<Boolean> canCommit() {
}
@Override public ListenableFuture<Boolean> canCommit() {
+ LOG.debug("txn {} canCommit", transactionId);
Callable<Boolean> call = new Callable<Boolean>() {
@Override
public Boolean call() throws Exception {
for(ActorPath actorPath : cohortPaths){
Callable<Boolean> call = new Callable<Boolean>() {
@Override
public Boolean call() throws Exception {
for(ActorPath actorPath : cohortPaths){
+
+ Object message = new CanCommitTransaction().toSerializable();
+ LOG.debug("txn {} Sending {} to {}", transactionId, message, actorPath);
+
ActorSelection cohort = actorContext.actorSelection(actorPath);
try {
Object response =
actorContext.executeRemoteOperation(cohort,
ActorSelection cohort = actorContext.actorSelection(actorPath);
try {
Object response =
actorContext.executeRemoteOperation(cohort,
-
new CanCommitTransaction().toSerializable()
,
+
message
,
ActorContext.ASK_DURATION);
if (response.getClass().equals(CanCommitTransactionReply.SERIALIZABLE_CLASS)) {
ActorContext.ASK_DURATION);
if (response.getClass().equals(CanCommitTransactionReply.SERIALIZABLE_CLASS)) {
@@
-80,6
+85,7
@@
public class ThreePhaseCommitCohortProxy implements
}
}
} catch(RuntimeException e){
}
}
} catch(RuntimeException e){
+ // FIXME : Need to properly handle this
LOG.error("Unexpected Exception", e);
return false;
}
LOG.error("Unexpected Exception", e);
return false;
}
@@
-93,14
+99,17
@@
public class ThreePhaseCommitCohortProxy implements
}
@Override public ListenableFuture<Void> preCommit() {
}
@Override public ListenableFuture<Void> preCommit() {
+ LOG.debug("txn {} preCommit", transactionId);
return voidOperation(new PreCommitTransaction().toSerializable(), PreCommitTransactionReply.SERIALIZABLE_CLASS);
}
@Override public ListenableFuture<Void> abort() {
return voidOperation(new PreCommitTransaction().toSerializable(), PreCommitTransactionReply.SERIALIZABLE_CLASS);
}
@Override public ListenableFuture<Void> abort() {
+ LOG.debug("txn {} abort", transactionId);
return voidOperation(new AbortTransaction().toSerializable(), AbortTransactionReply.SERIALIZABLE_CLASS);
}
@Override public ListenableFuture<Void> commit() {
return voidOperation(new AbortTransaction().toSerializable(), AbortTransactionReply.SERIALIZABLE_CLASS);
}
@Override public ListenableFuture<Void> commit() {
+ LOG.debug("txn {} commit", transactionId);
return voidOperation(new CommitTransaction().toSerializable(), CommitTransactionReply.SERIALIZABLE_CLASS);
}
return voidOperation(new CommitTransaction().toSerializable(), CommitTransactionReply.SERIALIZABLE_CLASS);
}
@@
-111,6
+120,8
@@
public class ThreePhaseCommitCohortProxy implements
for(ActorPath actorPath : cohortPaths){
ActorSelection cohort = actorContext.actorSelection(actorPath);
for(ActorPath actorPath : cohortPaths){
ActorSelection cohort = actorContext.actorSelection(actorPath);
+ LOG.debug("txn {} Sending {} to {}", transactionId, message, actorPath);
+
try {
Object response =
actorContext.executeRemoteOperation(cohort,
try {
Object response =
actorContext.executeRemoteOperation(cohort,