Skip to content

Commit

Permalink
0005847: Try again when foreign key correction fails
Browse files Browse the repository at this point in the history
  • Loading branch information
evan-miller-jumpmind committed May 18, 2023
1 parent 8b8d7cb commit 5b59db2
Showing 1 changed file with 8 additions and 2 deletions.
Expand Up @@ -2565,8 +2565,14 @@ protected void reloadMissingForeignKeyRows(Data data, long batchId, String nodeI
log.info("Issuing foreign key correction for batch {} table {}: foreign table '{}' column '{}' fk name '{}' where '{}'",
batchName, data.getTableName(), Table.getFullyQualifiedTableName(catalog, schema, foreignTable.getName()),
foreignTableRow.getReferenceColumnName(), foreignTableRow.getFkName(), foreignTableRow.getWhereSql());
reloadTableImmediate(nodeId, catalog, schema, foreignTable.getName(), foreignTableRow.getWhereSql(),
dataId == -1 ? Constants.CHANNEL_CONFIG : null);
try {
reloadTableImmediate(nodeId, catalog, schema, foreignTable.getName(), foreignTableRow.getWhereSql(),
dataId == -1 ? Constants.CHANNEL_CONFIG : null);
} catch (Exception ex) {
log.info("Failed to issue foreign key correction, but will try again,", ex);
reloadTableImmediate(nodeId, catalog, schema, foreignTable.getName(), foreignTableRow.getWhereSql(),
dataId == -1 ? Constants.CHANNEL_CONFIG : null);
}
}
}
} else {
Expand Down

0 comments on commit 5b59db2

Please sign in to comment.