Skip to content
This repository has been archived by the owner on Sep 6, 2023. It is now read-only.

Commit

Permalink
feat: change DB connection mode to improve performance
Browse files Browse the repository at this point in the history
  • Loading branch information
maximecaruchet committed Jan 12, 2021
1 parent 2fbd8cc commit 4f2e31e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/store/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ func NewStore() error {
}

session.Refresh()
session.SetMode(mgo.SecondaryPreferred, true)
session.SetMode(mgo.Eventual, true)
if viper.GetInt("db_ensure_safe_db_write") > 0 {
session.EnsureSafe(&mgo.Safe{W: viper.GetInt("db_ensure_safe_db_write"), FSync: true})
}
Expand Down

0 comments on commit 4f2e31e

Please sign in to comment.