Upgrade reactivemongo 0.12.2 -> 0.12.3
Upgrading to 0.12.7 resulted to disastrous disk reads on the primary. Now upgrading one version at a time to identify the culpritpull/4195/merge
parent
73868d1144
commit
a7eedd52bb
|
@ -145,18 +145,19 @@ trait CollExt { self: dsl with QueryBuilderExt =>
|
|||
maxDocs: Int,
|
||||
readPreference: ReadPreference = ReadPreference.primary,
|
||||
allowDiskUse: Boolean = false
|
||||
): Fu[List[Bdoc]] = coll.aggregate1[Bdoc](
|
||||
): Fu[List[Bdoc]] = coll.aggregatorContext[Bdoc](
|
||||
firstOperator,
|
||||
otherOperators,
|
||||
readPreference = readPreference
|
||||
).collect[List](maxDocs = maxDocs, Cursor.FailOnError[List[Bdoc]]())
|
||||
).prepared[Cursor](CursorProducer.defaultCursorProducer[Bdoc]).cursor.collect[List](maxDocs = maxDocs, Cursor.FailOnError[List[Bdoc]]())
|
||||
|
||||
def aggregateOne(
|
||||
firstOperator: AggregationFramework.PipelineOperator,
|
||||
otherOperators: List[AggregationFramework.PipelineOperator] = Nil,
|
||||
readPreference: ReadPreference = ReadPreference.primary
|
||||
): Fu[Option[Bdoc]] =
|
||||
coll.aggregate1[Bdoc](firstOperator, otherOperators, readPreference = readPreference).headOption
|
||||
coll.aggregatorContext[Bdoc](firstOperator, otherOperators, readPreference = readPreference)
|
||||
.prepared[Cursor](CursorProducer.defaultCursorProducer[Bdoc]).cursor.headOption
|
||||
|
||||
def distinctWithReadPreference[T, M[_] <: Iterable[_]](
|
||||
key: String,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package lila.learn
|
||||
|
||||
import reactivemongo.bson._
|
||||
import reactivemongo.bson.{ MapReader => _, MapWriter => _, _ }
|
||||
|
||||
import lila.db.BSON
|
||||
import lila.db.dsl._
|
||||
|
|
|
@ -102,7 +102,7 @@ object Seek {
|
|||
createdAt = DateTime.now
|
||||
)
|
||||
|
||||
import reactivemongo.bson._
|
||||
import reactivemongo.bson.{ MapReader => _, MapWriter => _, _ }
|
||||
import lila.db.BSON.MapValue.MapHandler
|
||||
import lila.db.BSON.BSONJodaDateTimeHandler
|
||||
implicit val lobbyPerfBSONHandler = new BSONHandler[BSONInteger, LobbyPerf] {
|
||||
|
|
|
@ -44,7 +44,7 @@ object Dependencies {
|
|||
val jwt = "com.pauldijou" %% "jwt-core" % "0.14.1"
|
||||
|
||||
object reactivemongo {
|
||||
val version = "0.12.2"
|
||||
val version = "0.12.3"
|
||||
val driver = ("org.reactivemongo" %% "reactivemongo" % version)
|
||||
.exclude("com.typesafe.akka", "*") // provided by Play
|
||||
.exclude("com.typesafe.play", "*")
|
||||
|
|
Loading…
Reference in New Issue