It appears that you are using the PostgreSQL CopyManager, correct? Looking at QueryExecutorImpl it appears that rollback() is trying to obtain a lock that was not released by the CopyManager. I recommend using the CopyManager.copyIn() method that returns a CopyIn object, rather than using the convenience method that takes a reader. Use the writeToCopy() to pump the data in, and be sure to catch SQLException. If you get an SQLException, call cancelCopy() and retry or whatever your recovery scenario is, otherwise call endCopy(). I would have expected PostgreSQL to handle the severing of a Connection in the middle of a bulk copy better, but that is probably a question for the PostgreSQL group.
Just my armchair diagnosis. On Wednesday, August 6, 2014 11:04:13 PM UTC+9, Jasper wrote: > > > Sys-akka.actor.pinned-dispatcher-6 [WAITING] > java.lang.Object.wait()Object.java:503 > org.postgresql.core.v3.QueryExecutorImpl.waitOnLock()QueryExecutorImpl. > java:91 > org.postgresql.core.v3.QueryExecutorImpl.execute(Query, ParameterList, > ResultHandler, int, int, int)QueryExecutorImpl.java:228 > org.postgresql.jdbc2.AbstractJdbc2Connection.executeTransactionCommand( > Query)AbstractJdbc2Connection.java:808 > org.postgresql.jdbc2.AbstractJdbc2Connection.rollback() > AbstractJdbc2Connection.java:861 > com.zaxxer.hikari.proxy.ConnectionProxy.resetConnectionState() > ConnectionProxy.java:192 > com.zaxxer.hikari.proxy.ConnectionProxy.close()ConnectionProxy.java:305 > java.lang.reflect.Method.invoke(Object, Object[])Method.java:606 > xx.xxxx.util.Cleaning$.using(Object, Function1)Cleaning.scala:14 > xx.xxxx.actors.FileProcessor$$anonfun$receive$1$$anonfun$applyOrElse$1. > apply$mcV$sp()FileProcessor.scala:75 > xx.xxxx.actors.FileProcessor$$anonfun$receive$1$$anonfun$applyOrElse$1. > apply()FileProcessor.scala:56 > xx.xxxx.actors.FileProcessor$$anonfun$receive$1$$anonfun$applyOrElse$1. > apply()FileProcessor.scala:56 > akka.pattern.CircuitBreaker$$anonfun$withSyncCircuitBreaker$1.apply() > CircuitBreaker.scala:135 > akka.pattern.CircuitBreaker$$anonfun$withSyncCircuitBreaker$1.apply() > CircuitBreaker.scala:135 > akka.pattern.CircuitBreaker$State$class.callThrough(CircuitBreaker$State, > Function0)CircuitBreaker.scala:296 > akka.pattern.CircuitBreaker$Closed$.callThrough(Function0)CircuitBreaker. > scala:345 > akka.pattern.CircuitBreaker$Closed$.invoke(Function0)CircuitBreaker.scala: > 354 > akka.pattern.CircuitBreaker.withCircuitBreaker(Function0)CircuitBreaker. > scala:113 > akka.pattern.CircuitBreaker.withSyncCircuitBreaker(Function0) > CircuitBreaker.scala:135 > xx.xxxx.actors.FileProcessor$$anonfun$receive$1.applyOrElse(Object, > Function1)FileProcessor.scala:55 > akka.actor.Actor$class.aroundReceive(Actor, PartialFunction, Object)Actor. > scala:</spa > ... -- >>>>>>>>>> Read the docs: http://akka.io/docs/ >>>>>>>>>> Check the FAQ: >>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups "Akka User List" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
