-
Notifications
You must be signed in to change notification settings - Fork 361
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cancel the DB side query when doobie execution is cancelled #1922
Comments
Repeating my comment from Discord: a user can always opt-out of cancelation by adding |
Hello! Can I as a user customise transactor somehow from the outside to get the behaviour mentioned? Just not to wait for this feature to be implemented. |
@AlekseyKovalevsky In plain Java/JDBC, what needs to be called is PreparedStatement#cancel, but this has to be done from another thread (since JDBC operations are blocking). Therefore in order to do the same in Doobie I think we'll need to fork a fiber to cancel the preparedstatement when a cancellation is signaled from the caller of |
Actually this is a perfect usecase for the https://typelevel.org/cats-effect/docs/faq#how-do-i-cancel-or-timeout-delay-or-blocking |
Hello. |
Conversation and possible fix are there #2077 |
@jatcwang Hello! How soon we could see these fixes in a new RC version ? |
@TalkingFoxMid Hey sorry releasing it currently blocked because the Sonatype password (API token) needs to be regenerated but that's something only Rob can do. I've reached out a couple of days ago and he said he'll look into it. |
We don't need to cherry-pick, when we migrate we'll just move the entire repository over including PRs. Actually if we do this it will fix publishing, since the Typelevel publishing credentials now have permissions for |
Oh nice @armanbilge I didn't know that typelevel org can publish to |
@jatcwang Hello! Sorry but I don't fully understand what the further plan is for rolling out version 1.0-RC6. Please explain what is the next step |
Hi @TalkingFoxMid sorry for the delay. I just merged the final PR that I think needs to go into 1.0-RC6. If you don't find any big issues, I'll tag 1.0-RC6 tomorrow. |
@TalkingFoxMid 1.0-RC6 has been released. Thanks for your help! |
If we run a long running query but then cancel it (e.g. application-side timeout or
IO.race
), we might want to cancel the DB side query by calling PreparedStatement#cancel(). (Simply callingclose()
which we currently do does not seem to cancel the query on the DB-side)e.g. https://discord.com/channels/632277896739946517/632727524434247691/1151507294664786021
Will need some more thought on whether this is universally desirable, and if not we'll need to make this configurable somehow (e.g. opt-in or opt-out)
The text was updated successfully, but these errors were encountered: