carocad commented on PR #8522: URL: https://github.com/apache/incubator-devlake/pull/8522#issuecomment-3303890278
> It makes sense to me. However, the fix changes the default value, which is a breaking change. fair point, an alternative implementation would be to only default to 10 connections if the user didn't provide a value. The method `GetInt` returns `0` if there was nothing provided. According to the SQL driver [docs](https://pkg.go.dev/database/sql#DB.SetMaxIdleConns) `If n <= 0, no idle connections are retained`. So a user could specify `-1` as a value and remove idle connections that way. The current behavior would stay the same for users already providing a value `> 0`. ```go idleConns := configReader.GetInt("DB_IDLE_CONNS") if idleConns == 0 { idleConns = 10 } ``` -- 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]
