Navigation Menu

Skip to content

Commit

Permalink
0004798: No data found while correcting foreign key error for reload
Browse files Browse the repository at this point in the history
batch
  • Loading branch information
erilong committed Jan 28, 2021
1 parent fef36f1 commit ebb5865
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
Expand Up @@ -2537,8 +2537,15 @@ public void reloadMissingForeignKeyRowsForLoad(String sourceNodeId, long batchId
public void sendMissingForeignKeyRowsForLoad(long batchId, String nodeId, long rowNumber, String rowData) {
ISqlReadCursor<Data> cursor = null;
Data data = null;
long startBatchId = batchId;
if (parameterService.is(ParameterConstants.INITIAL_LOAD_USE_EXTRACT_JOB)) {
startBatchId = sqlTemplateDirty.queryForLong(getSql("selectStartBatchExtractRequest"), batchId, nodeId);
if (startBatchId == 0) {
startBatchId = batchId;
}
}
try {
cursor = selectDataFor(batchId, nodeId, false);
cursor = selectDataFor(startBatchId, nodeId, false);
data = cursor.next();
} finally {
cursor.close();
Expand Down
Expand Up @@ -154,6 +154,9 @@ public DataServiceSqlMap(IDatabasePlatform platform, Map<String, String> replace
+ " last_update_time = ? "
+ " where load_id = ? and completed = 0");

putSql("selectStartBatchExtractRequest",
"select start_batch_id from $(extract_request) where ? between start_batch_id and end_batch_id and node_id = ?");

putSql("updateTableReloadStatusFinalizeCount", "update $(table_reload_status) set "
+ " finalize_batch_count = ?, last_update_time = ? "
+ " where load_id = ?");
Expand Down

0 comments on commit ebb5865

Please sign in to comment.