klesh commented on code in PR #4273:
URL:
https://github.com/apache/incubator-devlake/pull/4273#discussion_r1090286254
##########
backend/plugins/starrocks/tasks/tasks.go:
##########
@@ -186,16 +186,20 @@ func createTmpTable(starrocks *sql.DB, db dal.Dal,
starrocksTable string, starro
firstcm := ""
firstcmName := ""
var rowsInStarRocks *sql.Rows
+ var rowsInPostgres dal.Rows
defer func() {
if rowsInStarRocks != nil {
rowsInStarRocks.Close()
}
+ if rowsInPostgres != nil {
+ rowsInPostgres.Close()
+ }
}()
for _, cm := range columnMetas {
name := cm.Name()
if name == updateColumn {
// check update column to detect skip or not
- rows, err := db.Cursor(
+ rowsInPostgres, err = db.Cursor(
Review Comment:
I believe we should close the cursor before assigning new one to the
variable.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]