Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
0002621: Slow performance of ConfigurationChangedDataRouter on trigger
re-creation with many triggers
trigger router cache was already flushed, so don't need to pass variable
on individual calls
  • Loading branch information
erilong committed Jun 7, 2016
1 parent f5bba21 commit de8a511
Showing 1 changed file with 2 additions and 4 deletions.
Expand Up @@ -330,10 +330,8 @@ protected void queueSyncTriggers(SimpleRouterContext routingContext, DataMetaDat

ITriggerRouterService triggerRouterService = engine.getTriggerRouterService();

boolean refreshCache = false;
if (routingContext.get(CTX_KEY_FLUSHED_TRIGGER_ROUTERS) == null) {
triggerRouterService.clearCache();
refreshCache = true;
routingContext.put(CTX_KEY_FLUSHED_TRIGGER_ROUTERS, true);
}

Expand All @@ -343,13 +341,13 @@ protected void queueSyncTriggers(SimpleRouterContext routingContext, DataMetaDat
if (tableMatches(dataMetaData, TableConstants.SYM_TRIGGER_ROUTER)) {
String routerId = columnValues.get("ROUTER_ID");
TriggerRouter tr = triggerRouterService.findTriggerRouterById(triggerId,
routerId, refreshCache);
routerId, false);
if (tr != null) {
trigger = tr.getTrigger();
lastUpdateTime = tr.getLastUpdateTime();
}
} else {
trigger = triggerRouterService.getTriggerById(triggerId, refreshCache);
trigger = triggerRouterService.getTriggerById(triggerId, false);
if (trigger != null) {
lastUpdateTime = trigger.getLastUpdateTime();
}
Expand Down

0 comments on commit de8a511

Please sign in to comment.