Skip to content

Commit

Permalink
0000971: Push / Pull threads should run in Job's thread when jobs.syn…
Browse files Browse the repository at this point in the history
…chronized.enable is true
  • Loading branch information
mhanes committed Jan 4, 2013
1 parent d4f85bb commit eb5fa08
Showing 1 changed file with 7 additions and 2 deletions.
Expand Up @@ -228,7 +228,7 @@ public boolean execute(final NodeCommunication nodeCommunication, RemoteNodeStat
nodeCommunication.setLockingServerId(clusterService.getServerId());
final RemoteNodeStatus status = statuses.add(nodeCommunication.getNode());
ThreadPoolExecutor service = getExecutor(nodeCommunication.getCommunicationType());
service.execute(new Runnable() {
Runnable r = new Runnable() {
public void run() {
long ts = System.currentTimeMillis();
boolean failed = false;
Expand Down Expand Up @@ -262,7 +262,12 @@ public void run() {
save(nodeCommunication);
}
}
});
};
if (parameterService.is(ParameterConstants.SYNCHRONIZE_ALL_JOBS)) {
r.run();
} else {
service.execute(r);
}
}
return locked;
}
Expand Down

0 comments on commit eb5fa08

Please sign in to comment.