Skip to content
Browse files

upgrade various deps and timeout config

Bump Finagle to 5.3.24.
Bump Lift to 2.4.

Finagle has very low default timeout values. Increase the timeouts to be generous.
  • Loading branch information...
1 parent 5df443c commit 21fc8fb85355e2e490b7f29f0460e3d026fcab60 @tdyas tdyas committed Dec 9, 2012
Showing with 13 additions and 8 deletions.
  1. +8 −8 build.sbt
  2. +5 −0 src/main/scala/com/foursquare/slashem/Schema.scala
View
16 build.sbt
@@ -18,22 +18,22 @@ libraryDependencies <++= (scalaVersion) { scalaVersion =>
case _ => "1.9"
}
val liftVersion = scalaVersion match {
- case "2.9.1" => "2.4-M5"
+ case "2.9.1" => "2.4"
case _ => "2.4-M2"
}
Seq(
"net.liftweb" %% "lift-record" % liftVersion % "compile",
- "org.mongodb" % "mongo-java-driver" % "[2.6.5,)" % "compile",
- "junit" % "junit" % "[4.8.2,)" % "test",
- "com.novocode" % "junit-interface" % "[0.7,)" % "test" ,
- "org.scala-tools.testing" %% "specs" % specsVersion % "test",
+ "org.mongodb" % "mongo-java-driver" % "[2.6.5,)" % "compile",
+ "junit" % "junit" % "[4.8.2,)" % "test",
+ "com.novocode" % "junit-interface" % "[0.7,)" % "test" ,
+ "org.scala-tools.testing" %% "specs" % specsVersion % "test",
"org.elasticsearch" % "elasticsearch" % "0.19.4" % "compile" exclude("log4j", "log4j") exclude("com.sun.jmx","jmxri") exclude("com.sun.jdmk","jmxtools") exclude("com.codahale","jerkson_2.8.1") exclude("com.codahale","jerkson") exclude("com.twitter","streamyj_2.8.1") exclude("org.codehaus.jackson" , "jackson-mapper-asl") exclude("org.codehas.jackson" , "jackson-core-asl"),
"org.codehaus.jackson" % "jackson-mapper-asl" % "1.8.8",
"org.codehaus.jackson" % "jackson-core-asl" % "1.8.8",
"org.scala-tools.testing" %% "scalacheck" % scalaCheckVersion % "test",
- "com.twitter" % "finagle-core" % "5.3.6" % "compile" exclude("thrift","libthrift"),
- "com.twitter" % "finagle-http" % "5.3.6" % "compile" exclude("thrift","libthrift"),
- "com.twitter" % "util-core" % "1.12.9" % "compile",
+ "com.twitter" % "finagle-core" % "5.3.23" % "compile" exclude("thrift", "libthrift"),
+ "com.twitter" % "finagle-http" % "5.3.23" % "compile" exclude("thrift", "libthrift"),
+ "com.twitter" % "util-core" % "5.3.14" % "compile",
"org.scalaj" %% "scalaj-collection" % "1.2"
)
}
View
5 src/main/scala/com/foursquare/slashem/Schema.scala
@@ -4,6 +4,7 @@ package com.foursquare.slashem
import com.foursquare.slashem.Ast._
+import com.twitter.conversions.time._
import com.twitter.util.{Duration, ExecutorServiceFuturePool, Future, FuturePool, FutureTask, Promise}
import com.twitter.finagle.builder.ClientBuilder
import com.twitter.finagle.http.Http
@@ -294,6 +295,8 @@ trait SolrMeta[T <: Record[T]] extends SlashemMeta[T] {
def retries = 3
def hostConnectionLimit = 1000
def hostConnectionCoresize = 300
+ def solrTcpConnectTimeout: Duration = 10.seconds
+ def solrTimeout: Duration = 30.seconds
var myClient: Option[Service[HttpRequest,HttpResponse]] = None
@@ -313,6 +316,8 @@ trait SolrMeta[T <: Record[T]] extends SlashemMeta[T] {
.hostConnectionLimit(hostConnectionLimit)
.hostConnectionCoresize(hostConnectionCoresize)
.retries(retries)
+ .tcpConnectTimeout(solrTcpConnectTimeout)
+ .timeout(solrTimeout)
.name(solrName)
(receiver match {
case Some(r) => cb.reportTo(r)

1 comment on commit 21fc8fb

@jonshea
Foursquare member

Looks good to me. Thanks Tom.

Please sign in to comment.
Something went wrong with that request. Please try again.