Skip to content

Commit

Permalink
fix: check both update time and record count when judge skippable (#6039
Browse files Browse the repository at this point in the history
) (#6040) (#6042)
  • Loading branch information
usharerose authored Sep 8, 2023
1 parent 3706515 commit f5b52fa
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion backend/plugins/starrocks/tasks/tasks.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,19 @@ func createTmpTableInStarrocks(dc *DataConfigParams) (map[string]string, string,
}
} else {
if updatedFrom.Equal(updatedTo) {
return nil, "", true, nil
sourceCount, err := db.Count(dal.From(table))
if err != nil {
return nil, "", false, err
}
starrocksCount, err := starrocksDb.Count(dal.From(starrocksTable))
if err != nil {
return nil, "", false, err
}
// When updated time is equal but record count is different,
// need to execute the following process, not returning here
if sourceCount == starrocksCount {
return nil, "", true, nil
}
}
}
}
Expand Down

0 comments on commit f5b52fa

Please sign in to comment.