You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The driver supports timeouts, it's cool. But not in the way I expected. It does conn.SetReadDeadline/conn.SetWriteDeadline on every Read/Write call and it's bad, consider following situation:
I set timeout 2 seconds. I run a query. Query response size is 1024 bytes. Database server sends response with very high latency 128 bytes every second, so every Read call returns 128 bytes and doesn't raise timeout error (1 second < 2 seconds), but i will receive whole response in 8 seconds what doesn't fit into my timeout.
The driver should call conn.SetDeadline outside the Read loop as it is done in http protocol.
The text was updated successfully, but these errors were encountered:
The driver supports timeouts, it's cool. But not in the way I expected. It does conn.SetReadDeadline/conn.SetWriteDeadline on every Read/Write call and it's bad, consider following situation:
I set timeout 2 seconds. I run a query. Query response size is 1024 bytes. Database server sends response with very high latency 128 bytes every second, so every Read call returns 128 bytes and doesn't raise timeout error (1 second < 2 seconds), but i will receive whole response in 8 seconds what doesn't fit into my timeout.
The driver should call conn.SetDeadline outside the Read loop as it is done in http protocol.
The text was updated successfully, but these errors were encountered: