You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by GitBox <gi...@apache.org> on 2021/06/16 08:00:53 UTC

[GitHub] [servicecomb-service-center] robotLJW commented on a change in pull request #1053: fixbugs: mongo connection pool is full (#1052)

robotLJW commented on a change in pull request #1053:
URL: https://github.com/apache/servicecomb-service-center/pull/1053#discussion_r652446366



##########
File path: datasource/mongo/mongo.go
##########
@@ -130,7 +130,8 @@ func (ds *DataSource) initClient() error {
 	verifyPeer := config.GetBool("registry.mongo.cluster.verifyPeer", false)
 	certFile := config.GetString("registry.mongo.cluster.certFile", "")
 	keyFile := config.GetString("registry.mongo.cluster.keyFile", "")
-	cfg := storage.NewConfig(uri, storage.SSLEnabled(sslEnable), storage.RootCA(rootCA), storage.VerifyPeer(verifyPeer), storage.CertFile(certFile), storage.KeyFile(keyFile))
+	poolSize := config.GetInt("registry.mongo.cluster.poolSize", 1000)

Review comment:
       得做个负数判断,若小于等于0 赋值为1000,第二个就是1000,弄成一个常量,魔鬼数字




-- 
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.

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