You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by ti...@apache.org on 2021/03/10 01:38:59 UTC
[servicecomb-kie] branch master updated: change mongo session mode
(#177)
This is an automated email from the ASF dual-hosted git repository.
tianxiaoliang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/servicecomb-kie.git
The following commit(s) were added to refs/heads/master by this push:
new 60d9d33 change mongo session mode (#177)
60d9d33 is described below
commit 60d9d331ba4488a71b67338d01b12afc4b46a14b
Author: GuoYL <53...@users.noreply.github.com>
AuthorDate: Wed Mar 10 09:38:50 2021 +0800
change mongo session mode (#177)
---
server/service/mongo/session/session.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/server/service/mongo/session/session.go b/server/service/mongo/session/session.go
index d4c22c4..1248cdc 100644
--- a/server/service/mongo/session/session.go
+++ b/server/service/mongo/session/session.go
@@ -203,7 +203,7 @@ func GetColInfo(ctx context.Context, name string) (*CollectionInfo, error) {
func EnsureDB() {
session := OpenSession()
defer session.Close()
- session.SetMode(mgo.Monotonic, true)
+ session.SetMode(mgo.Primary, true)
ensureRevisionCounter(session)