Skip to content

Commit

Permalink
fix upgrade feature
Browse files Browse the repository at this point in the history
  • Loading branch information
chenson42 committed Feb 1, 2013
1 parent a4223f6 commit e2d1913
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
Expand Up @@ -163,7 +163,6 @@ public Set<String> routeToNodes(SimpleRouterContext routingContext, DataMetaData
}
}
} else if (tableMatches(dataMetaData, TableConstants.SYM_TABLE_RELOAD_REQUEST)) {
String tableName = tableName(TableConstants.SYM_TABLE_RELOAD_REQUEST);
String sourceNodeId = columnValues.get("SOURCE_NODE_ID");
String reloadEnabled = columnValues.get("RELOAD_ENABLED");
if (me.getNodeId().equals(sourceNodeId)) {
Expand All @@ -184,20 +183,14 @@ public Set<String> routeToNodes(SimpleRouterContext routingContext, DataMetaData
routerId));
}
} else {
boolean routed = false;
for (Node nodeThatMayBeRoutedTo : possibleTargetNodes) {
if (nodeThatMayBeRoutedTo.getNodeId().equals(sourceNodeId)) {
if (nodeIds == null) {
nodeIds = new HashSet<String>();
}
nodeIds.add(sourceNodeId);
routed = true;
}
}

if (!routed) {
log.error("{} row with a source node id of {} could not be routed because the node is not a client of this node", tableName, sourceNodeId);
}
}

} else {
Expand Down
Expand Up @@ -486,14 +486,14 @@ public TriggerRouter getTriggerRouterForCurrentNode(String triggerId, String rou
List<TriggerRouter> triggerRouters = getTriggerRoutersForCurrentNode(refreshCache).get(triggerId);
for (TriggerRouter testTriggerRouter : triggerRouters) {
if (testTriggerRouter.getRouter().getRouterId().equals(routerId) ||
testTriggerRouter.getRouter().getRouterId().equals(Constants.UNKNOWN_ROUTER_ID)) {
routerId.equals(Constants.UNKNOWN_ROUTER_ID)) {
triggerRouter = testTriggerRouter;
break;
}
}

if (triggerRouter == null) {
log.warn("Could not find trigger router {} {} in list {}", new Object[] {triggerId, routerId, triggerRouters.toString()});
log.warn("Could not find trigger router [{}:{}] in list {}", new Object[] {triggerId, routerId, triggerRouters.toString()});
}

return triggerRouter;
Expand Down

0 comments on commit e2d1913

Please sign in to comment.