You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by "long2ice (via GitHub)" <gi...@apache.org> on 2023/01/30 07:53:26 UTC

[GitHub] [incubator-devlake] long2ice opened a new pull request, #4273: fix: close pg conn

long2ice opened a new pull request, #4273:
URL: https://github.com/apache/incubator-devlake/pull/4273

   
   
   ### Summary
   What does this PR do?
   
   ### Does this close any open issues?
   Closes #4270 
   
   ### Screenshots
   Include any relevant screenshots here.
   
   ### Other Information
   Any other information that is important to this PR.
   


-- 
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: commits-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-devlake] klesh commented on a diff in pull request #4273: fix: close pg conn

Posted by "klesh (via GitHub)" <gi...@apache.org>.
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: commits-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-devlake] abeizn merged pull request #4273: fix: close pg conn

Posted by "abeizn (via GitHub)" <gi...@apache.org>.
abeizn merged PR #4273:
URL: https://github.com/apache/incubator-devlake/pull/4273


-- 
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: commits-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org