Navigation Menu

Skip to content

Commit

Permalink
0003087: When a trigger_hist row can't be found use the catalog and
Browse files Browse the repository at this point in the history
schema from the trigger definition to look up the table to "recreate"
  • Loading branch information
chenson42 committed May 2, 2017
1 parent 926024e commit a7a354a
Showing 1 changed file with 3 additions and 7 deletions.
Expand Up @@ -1379,11 +1379,6 @@ public String reloadNode(String nodeId, boolean reverseLoad, String createBy) {
return String.format("Could not enable initial load for %s", nodeId);
}
}

private void insertNodeSecurityUpdate(ISqlTransaction transaction, String nodeIdRecord,
String targetNodeId, boolean isLoad, long loadId, String createBy) {
insertNodeSecurityUpdate(transaction, nodeIdRecord, targetNodeId, isLoad, loadId, createBy, null);
}

private void insertNodeSecurityUpdate(ISqlTransaction transaction, String nodeIdRecord,
String targetNodeId, boolean isLoad, long loadId, String createBy, String channelId) {
Expand Down Expand Up @@ -2106,7 +2101,7 @@ public void deleteCapturedConfigChannelData() {
public Map<String, Date> getLastDataCaptureByChannel() {
Map<String, Date> captureMap = new HashMap<String, Date>();
LastCaptureByChannelMapper mapper = new LastCaptureByChannelMapper(captureMap);
List<String> temp = sqlTemplate.query(getSql("findLastCaptureTimeByChannelSql"), mapper);
sqlTemplate.query(getSql("findLastCaptureTimeByChannelSql"), mapper);
return mapper.getCaptureMap();
}

Expand Down Expand Up @@ -2217,12 +2212,13 @@ public Data mapRow(Row row) {
TriggerHistory triggerHistory = engine.getTriggerRouterService().getTriggerHistory(
triggerHistId);
if (triggerHistory == null) {
Table table = platform.getTableFromCache(null, null, tableName, true);
Trigger trigger = null;
Table table = null;
List<TriggerRouter> triggerRouters = engine.getTriggerRouterService().getAllTriggerRoutersForCurrentNode(engine.getNodeService().findIdentity().getNodeGroupId());
for (TriggerRouter triggerRouter : triggerRouters) {
if (triggerRouter.getTrigger().getSourceTableName().equalsIgnoreCase(tableName)) {
trigger = triggerRouter.getTrigger();
table = platform.getTableFromCache(trigger.getSourceCatalogName(), trigger.getSourceSchemaName(), tableName, false);
break;
}
}
Expand Down

0 comments on commit a7a354a

Please sign in to comment.