Skip to content

Commit

Permalink
Merge branch '3.9' of https://github.com/JumpMind/symmetric-ds.git in…
Browse files Browse the repository at this point in the history
…to 3.9
  • Loading branch information
jumpmind-josh committed Aug 3, 2018
2 parents e311e24 + a3f92f5 commit 35406c8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
Expand Up @@ -108,6 +108,8 @@
* @see IRouterService
*/
public class RouterService extends AbstractService implements IRouterService {

final int MAX_LOGGING_LENGTH = 512;

protected Map<String, Boolean> commonBatchesLastKnownState = new HashMap<String, Boolean>();

Expand Down Expand Up @@ -940,14 +942,15 @@ protected int selectDataAndRoute(ProcessInfo processInfo, ChannelRouterContext c
}

long routeTs = System.currentTimeMillis() - ts;
if (routeTs > LOG_PROCESS_SUMMARY_THRESHOLD) {
if (true || routeTs > LOG_PROCESS_SUMMARY_THRESHOLD) {
engine.getClusterService().refreshLock(ClusterConstants.ROUTE);
log.info(
"Routing for channel '{}' has been processing for {} seconds. The following stats have been gathered: "
+ "totalDataRoutedCount={}, totalDataEventCount={}, startDataId={}, endDataId={}, dataReadCount={}, peekAheadFillCount={}, transactions={}, dataGaps={}",
+ "totalDataRoutedCount={}, totalDataEventCount={}, startDataId={}, endDataId={}, dataReadCount={}, peekAheadFillCount={}, dataGaps={}",
new Object[] { context.getChannel().getChannelId(), ((System.currentTimeMillis()-startTime) / 1000), totalDataCount, totalDataEventCount, context.getStartDataId(),
context.getEndDataId(), context.getDataReadCount(), context.getPeekAheadFillCount(),
context.getTransactions().toString(), context.getDataGaps().toString() });
context.getEndDataId(), context.getDataReadCount(), context.getPeekAheadFillCount(),
StringUtils.abbreviate(context.getDataGaps().toString(), MAX_LOGGING_LENGTH)
});
ts = System.currentTimeMillis();
}

Expand Down
Expand Up @@ -37,9 +37,12 @@ public static void main(String[] args) throws Exception {
String configFile = null;
String jarFile = Wrapper.class.getProtectionDomain().getCodeSource().getLocation().getFile();

if (args.length > 1) {
if (args.length == 2) {
configFile = args[1];
appDir = getParentDir(configFile);
} else if (args.length == 3) {
configFile = args[1];
appDir = args[2];
} else {
appDir = getParentDir(jarFile);
configFile = findConfigFile(appDir + File.separator + "conf");
Expand Down

0 comments on commit 35406c8

Please sign in to comment.