From aa41dc3650d1ce3b1dfc1c86f956613988799744 Mon Sep 17 00:00:00 2001 From: skiffer-git <44203734@qq.com> Date: Fri, 16 Sep 2022 15:54:26 +0800 Subject: [PATCH] Support mongodb cluster --- pkg/common/db/model.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/common/db/model.go b/pkg/common/db/model.go index c5b1fb6be..c5e2349fe 100644 --- a/pkg/common/db/model.go +++ b/pkg/common/db/model.go @@ -76,7 +76,7 @@ func init() { config.Config.Mongo.DBUserName, config.Config.Mongo.DBPassword, mongodbHosts, config.Config.Mongo.DBDatabase, config.Config.Mongo.DBMaxPoolSize) } else { - uri = fmt.Sprintf("mongodb://%s/%s/?maxPoolSize=%d&authSource=admin&replicaSet=replset", + uri = fmt.Sprintf("mongodb://%s/%s/?maxPoolSize=%d&authSource=admin", mongodbHosts, config.Config.Mongo.DBDatabase, config.Config.Mongo.DBMaxPoolSize) }