This is an automated email from the ASF dual-hosted git repository.
abeizn pushed a commit to branch release-v0.19
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git
The following commit(s) were added to refs/heads/release-v0.19 by this push:
new 798544742 fix: check both update time and record count when judge
skippable (#6039) (#6040) (#6043)
798544742 is described below
commit 7985447428e2b850ebaf3041a14b4cd643d69f2c
Author: Chaojie Yan <[email protected]>
AuthorDate: Fri Sep 8 14:35:30 2023 +0800
fix: check both update time and record count when judge skippable (#6039)
(#6040) (#6043)
---
backend/plugins/starrocks/tasks/tasks.go | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/backend/plugins/starrocks/tasks/tasks.go
b/backend/plugins/starrocks/tasks/tasks.go
index f72f23ce6..a97f2dd2f 100644
--- a/backend/plugins/starrocks/tasks/tasks.go
+++ b/backend/plugins/starrocks/tasks/tasks.go
@@ -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
+ }
}
}
}