Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move loading of trigger_routers to more specific execution branch to reduce unneeded db calls #51

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

move loading of trigger_routers to more specific execution branch

  • Loading branch information...
woehrl01 committed Oct 12, 2017
commit 0a44f8b22b33d8e2c5b80ee0218ef679c19760d5
@@ -259,12 +259,7 @@ protected void insertInitialLoadEvents() {
for (NodeSecurity security : nodeSecurities) {
if (activeHistories.size() > 0) {
Node targetNode = engine.getNodeService().findNode(security.getNodeId());
List<TriggerRouter> triggerRouters = triggerRoutersByTargetNodeGroupId.get(targetNode.getNodeGroupId());
if (triggerRouters == null) {
triggerRouters = triggerRouterService.getAllTriggerRoutersForReloadForCurrentNode(parameterService.getNodeGroupId(), targetNode.getNodeGroupId());
triggerRoutersByTargetNodeGroupId.put(targetNode.getNodeGroupId(), triggerRouters);
}


boolean thisMySecurityRecord = security.getNodeId().equals(
identity.getNodeId());
boolean reverseLoadQueued = security.isRevInitialLoadEnabled();
@@ -276,6 +271,13 @@ protected void insertInitialLoadEvents() {
} else if (!thisMySecurityRecord && registered && initialLoadQueued
&& (!reverseLoadFirst || !reverseLoadQueued)) {
long ts = System.currentTimeMillis();

List<TriggerRouter> triggerRouters = triggerRoutersByTargetNodeGroupId.get(targetNode.getNodeGroupId());
if (triggerRouters == null) {
triggerRouters = triggerRouterService.getAllTriggerRoutersForReloadForCurrentNode(parameterService.getNodeGroupId(), targetNode.getNodeGroupId());
triggerRoutersByTargetNodeGroupId.put(targetNode.getNodeGroupId(), triggerRouters);
}

dataService.insertReloadEvents(
targetNode,
false, processInfo, activeHistories, triggerRouters);
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.