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

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


The following commit(s) were added to refs/heads/main by this push:
     new a4ccea8d6 fix: check both update time and record count when judge 
skippable (#6039) (#6040)
a4ccea8d6 is described below

commit a4ccea8d6734860d20b95c9f0f6eaa271f03ffbb
Author: Chaojie Yan <[email protected]>
AuthorDate: Fri Sep 8 11:27:06 2023 +0800

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