This is an automated email from the ASF dual-hosted git repository.

abeizn pushed a commit to branch release-v0.18
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git


The following commit(s) were added to refs/heads/release-v0.18 by this push:
     new f5b52faa0 fix: check both update time and record count when judge 
skippable (#6039) (#6040) (#6042)
f5b52faa0 is described below

commit f5b52faa0416d6d64ee5276eb14c800d86da460b
Author: Chaojie Yan <[email protected]>
AuthorDate: Fri Sep 8 14:35:33 2023 +0800

    fix: check both update time and record count when judge skippable (#6039) 
(#6040) (#6042)
---
 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
+                                       }
                                }
                        }
                }

Reply via email to