kclay / rethink-scala

Scala Driver for RethinkDB
Other
100 stars 24 forks source link

always get back future timeout #34

Closed shengc closed 9 years ago

shengc commented 9 years ago

Dependent on 0.4.7-SNAPSHOT, running following code,

import com.rethinkdb.Blocking._
import com.rethinkdb.net.Version3

val version = Version3(host = "localhost")  
implicit val connection = Blocking(version)

import com.rethinkscala._

val table = r.db("test").table("foos")
val created = table.create.run
println("created ? = " + created)

against rethink db 2.0.1, always ends up with future timeout,

ERROR [pool-6-thread-1] (Version.scala:329) - Timeout error
com.rethinkscala.net.BlockingReadTimeoutException
        at com.rethinkscala.net.BlockingReadHandler.readEvent(BlockingReadHandler.scala:44)
        at com.rethinkscala.net.BlockingReadHandler.read(BlockingReadHandler.scala:22)
        at com.rethinkscala.net.ConfigureAuth$class.configure(Version.scala:330)
        at com.rethinkscala.net.Version3.configure(Version.scala:406)
        at com.rethinkscala.net.AbstractConnection$$anon$4.configure(Connection.scala:112)
        at com.rethinkscala.net.AbstractConnection$$anon$4.configure(Connection.scala:98)
        at com.rethinkscala.utils.RethinkConnectionPool$$anonfun$com$rethinkscala$utils$RethinkConnectionPool$$execute$1$1.apply(AbstractConnectionPool.scala:125)
        at com.rethinkscala.utils.RethinkConnectionPool$$anonfun$com$rethinkscala$utils$RethinkConnectionPool$$execute$1$1.apply(AbstractConnectionPool.scala:122)
        at scala.concurrent.impl.Future$PromiseCompletingRunnable.liftedTree1$1(Future.scala:24)
        at scala.concurrent.impl.Future$PromiseCompletingRunnable.run(Future.scala:24)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:744)
created ? = Left(com.rethinkscala.net.RethinkTimeoutError: Futures timed out after [30 seconds]
kclay commented 9 years ago

I was just told that the driver stopped working with v2.0 by another user. I'm looking into it right now

shengc commented 9 years ago

though the timeout, the operation was actually executed successfully according to the admin page.

kclay commented 9 years ago

You good to go(do a sbt update if it doesn't auto pull down) , turns out the changes I was already making for another bug fixed this issue. Let me know how it works.

shengc commented 9 years ago

works now. Thanks for the quick turn around !