News for hackers. Stuff that matters.
Re:Three bugs in the Go MySQL driver by dullgiulio on Thursday May 21, 2020 @02:14AM (#23255360)
Of course it is up to the application to decide case-by-case.

Just keep in mind that if your query is started by a user request, but does not need to terminate in the context of the user request that triggered it, you can move the query to a separate goroutine and decouple it completely from the triggering user request.

Also, aborting a query is safe: the transaction gets rolled back, removing unwanted side effects. You cannot do harm by cancelling, bu you can do harm if you don't cancel.

There are no comments on this comment yet.