Re: [go-nuts] Re: Best timeOut for mongoDB context timeout in golang

2022-01-16 Thread Marcin Romaszewicz
SQL Databases also typically have query timeouts on the DB side. When you cancel a context, the DB could still chug on that query for a while. For example, https://www.postgresql.org/docs/current/runtime-config-client.html (see statement_timeout). If you want to reliably cancel connections and not

[go-nuts] Re: Best timeOut for mongoDB context timeout in golang

2022-01-16 Thread Brian Candler
Oops, subject said mongoDB not SQL. But I think the point stands. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To

[go-nuts] Re: Best timeOut for mongoDB context timeout in golang

2022-01-16 Thread Brian Candler
There is no upper bound to the time a SQL query can take. Even a simple "select" which requires a full table scan can take hours when run on a sufficiently large table. Ditto a complex "update" command, or a schema modification. You don't have to apply any time limit at all. But if you do,