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 culprit
pull/4195/merge
Thibault Duplessis 2018-04-05 18:38:16 +02:00
parent 73868d1144
commit a7eedd52bb
4 changed files with 7 additions and 6 deletions

View File

@ -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,

View File

@ -1,6 +1,6 @@
package lila.learn
import reactivemongo.bson._
import reactivemongo.bson.{ MapReader => _, MapWriter => _, _ }
import lila.db.BSON
import lila.db.dsl._

View File

@ -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] {

View File

@ -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", "*")