Skip to content

Commit

Permalink
Fix applier connection pool size.
Browse files Browse the repository at this point in the history
  • Loading branch information
arthurschreiber committed Oct 22, 2024
1 parent 1a5be0b commit 1942455
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions go/logic/applier.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,13 @@ func (this *Applier) InitDBConnections(maxConns int) (err error) {
if this.db, _, err = mysql.GetDB(this.migrationContext.Uuid, applierUri); err != nil {
return err
}
this.db.SetMaxOpenConns(maxConns)
this.db.SetMaxIdleConns(maxConns)
singletonApplierUri := fmt.Sprintf("%s&timeout=0", applierUri)
if this.singletonDB, _, err = mysql.GetDB(this.migrationContext.Uuid, singletonApplierUri); err != nil {
return err
}
this.singletonDB.SetMaxOpenConns(maxConns)
this.singletonDB.SetMaxIdleConns(maxConns)
this.singletonDB.SetMaxOpenConns(1)
version, err := base.ValidateConnection(this.db, this.connectionConfig, this.migrationContext, this.name)
if err != nil {
return err
Expand Down

0 comments on commit 1942455

Please sign in to comment.