Open Swoorup opened 2 years ago
Ok, I think I've narrowed it down. I leverage the queued
rather than pooled
generally which is why I haven't run into tis. But in the pool you have the ability to interrupt the underlying system which can leave connections in a bad state.
def makeSoftCancelable[F[_]: Concurrent, A](fa: F[A], supervisor: Supervisor[F]): F[A] = {
supervisor.supervise(fa)
.flatMap(_.joinWith(Concurrent[F].raiseError(new java.util.concurrent.CancellationException("Outcome was Canceled"))))
}
I should be able to make this soft cancelable with a dispatcher in the pooled and direct versions to prevent these leaking.
Great to hear. I do recall having issues with pool, than changing it to queued few months ago, but didn't note what caused the issue, since it was intermittent.
Hmmm, well that fixed that error and introduced a new one. We're in for a wild ride.
==> X io.chrisdavenport.rediculous.RedisCommandsSpec.early termination 30.004s java.util.concurrent.TimeoutException: Future timed out after [30 seconds]
Its binary compatible though and should remain so, so I think we are good to release the next version and fix it afterwards.
Using rediculous with timeout can cause weird issues intermittently.
Repro test case.
Add the following to
RedisCommandSpec.scala
and do a few trial runs.Observe the error
Fix is probably to add
.uncancelable
statement to the effect returned byRedisConnection::explicitPipelineRequest