Skip to content

Commit

Permalink
Close local table conns for distributed table engine
Browse files Browse the repository at this point in the history
  • Loading branch information
jinzhu committed Jun 3, 2024
1 parent 10557f4 commit 065c557
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions update.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ func (dialector *Dialector) Update(db *gorm.DB) {

for j := 0; j < 3; j++ {
if conn, e := clickhouse.Open(&opts); e == nil {
defer conn.Close()
if e = conn.Exec(db.Statement.Context, updateSQL, db.Statement.Vars...); e == nil {
break
}
Expand Down

0 comments on commit 065c557

Please sign in to comment.