Skip to content

Commit

Permalink
0001238: Issue with detecting whether batch is common or not.
Browse files Browse the repository at this point in the history
  • Loading branch information
chenson42 committed May 22, 2013
1 parent aab8fed commit 56356ef
Showing 1 changed file with 17 additions and 13 deletions.
Expand Up @@ -311,19 +311,23 @@ protected boolean producesCommonBatches(String channelId,
* data to all nodes in a node_group. We can only do 'optimal'
* routing if data is going to go to all nodes in a group.
*/
if (!(dataRouter instanceof DefaultDataRouter)) {
producesCommonBatches = false;
break;
} else {
if (triggerRouter
.getTrigger().isSyncOnIncomingBatch()) {
String tableName = triggerRouter.getTrigger().getFullyQualifiedSourceTableName();
for (TriggerRouter triggerRouter2 : allTriggerRoutersForChannel) {
if (triggerRouter2.getTrigger().getFullyQualifiedSourceTableName().equals(tableName) &&
triggerRouter2.getRouter()
.getNodeGroupLink().getTargetNodeGroupId().equals(nodeGroupId)) {
producesCommonBatches = false;
break;
if (triggerRouter.getRouter().getNodeGroupLink().getSourceNodeGroupId()
.equals(nodeGroupId)) {
if (!(dataRouter instanceof DefaultDataRouter)) {
producesCommonBatches = false;
break;
} else {
if (triggerRouter.getTrigger().isSyncOnIncomingBatch()) {
String tableName = triggerRouter.getTrigger()
.getFullyQualifiedSourceTableName();
for (TriggerRouter triggerRouter2 : allTriggerRoutersForChannel) {
if (triggerRouter2.getTrigger().getFullyQualifiedSourceTableName()
.equals(tableName)
&& triggerRouter2.getRouter().getNodeGroupLink()
.getTargetNodeGroupId().equals(nodeGroupId)) {
producesCommonBatches = false;
break;
}
}
}
}
Expand Down

0 comments on commit 56356ef

Please sign in to comment.