Skip to content

Commit

Permalink
0002428: Log who has the sync triggers job locked if it is cluster
Browse files Browse the repository at this point in the history
locked and another node attempts to sync triggers
  • Loading branch information
chenson42 committed Oct 28, 2015
1 parent 746ca6d commit 455680e
Showing 1 changed file with 8 additions and 2 deletions.
Expand Up @@ -51,6 +51,7 @@
import org.jumpmind.symmetric.config.TriggerSelector;
import org.jumpmind.symmetric.io.data.DataEventType;
import org.jumpmind.symmetric.model.Channel;
import org.jumpmind.symmetric.model.Lock;
import org.jumpmind.symmetric.model.NodeGroupLink;
import org.jumpmind.symmetric.model.NodeSecurity;
import org.jumpmind.symmetric.model.Router;
Expand Down Expand Up @@ -119,7 +120,7 @@ public class TriggerRouterService extends AbstractService implements ITriggerRou

private Date lastUpdateTime;

private Object cacheLock = new Object();
private Object cacheLock = new Object();

/**
* Cache the history for performance. History never changes and does not
Expand Down Expand Up @@ -1185,7 +1186,12 @@ public void syncTriggers(StringBuilder sqlBuffer, boolean force) {
log.info("Done synchronizing triggers");
}
} else {
log.info("Sync triggers was locked by the cluster service");
Lock lock = clusterService.findLocks().get(ClusterConstants.SYNCTRIGGERS);
if (lock != null) {
log.info("Sync triggers was locked by the cluster service. The locking server id was: {}. The lock time was: {}", lock.getLockingServerId(), lock.getLockTime());
} else {
log.info("Sync triggers was locked by something but lock details were found");
}
}
}
} else {
Expand Down

0 comments on commit 455680e

Please sign in to comment.