Skip to content

Commit

Permalink
0002526: Improve performance of data gap detection
Browse files Browse the repository at this point in the history
try to get unit tests working, which init engine differently
  • Loading branch information
erilong committed Jul 21, 2016
1 parent 1eedbf6 commit 1f8632b
Showing 1 changed file with 11 additions and 10 deletions.
Expand Up @@ -141,15 +141,7 @@ public RouterService(ISymmetricEngine engine) {
extensionService.addExtensionPoint("dbf", new DBFRouter(engine));

setSqlMap(new RouterServiceSqlMap(symmetricDialect.getPlatform(),
createSqlReplacementTokens()));

if (parameterService.is(ParameterConstants.ROUTING_USE_FAST_GAP_DETECTOR)) {
gapDetector = new DataGapFastDetector(engine.getDataService(), parameterService, engine.getContextService(),
symmetricDialect, this, engine.getStatisticManager(), engine.getNodeService());
} else {
gapDetector = new DataGapDetector(engine.getDataService(), parameterService, symmetricDialect,
this, engine.getStatisticManager(), engine.getNodeService());
}
createSqlReplacementTokens()));
}

/**
Expand Down Expand Up @@ -190,7 +182,16 @@ synchronized public long routeData(boolean force) {
engine.getOutgoingBatchService().updateAbandonedRoutingBatches();
firstTimeCheckForAbandonedBatches = false;
}


if (gapDetector == null) {
if (parameterService.is(ParameterConstants.ROUTING_USE_FAST_GAP_DETECTOR)) {
gapDetector = new DataGapFastDetector(engine.getDataService(), parameterService, engine.getContextService(),
symmetricDialect, this, engine.getStatisticManager(), engine.getNodeService());
} else {
gapDetector = new DataGapDetector(engine.getDataService(), parameterService, symmetricDialect,
this, engine.getStatisticManager(), engine.getNodeService());
}
}
insertInitialLoadEvents();

long ts = System.currentTimeMillis();
Expand Down

0 comments on commit 1f8632b

Please sign in to comment.