enforce database timeouts#1781
Conversation
64a1a10 to
5ba3782
Compare
|
The query timeout issue is tracked also under issue: #1740 The timeout of the query can be defined for PostgreSQL in the database level but for SQLite we do not have this option. Need to discuss with @adecaro and @mbrandenburger which approach is better. |
After consulting with @adecaro, |
Signed-off-by: Hayim.Shaul@ibm.com <hayimsha@fhe03.vpc.cloud9.ibm.com>
Signed-off-by: Hayim.Shaul@ibm.com <hayimsha@fhe03.vpc.cloud9.ibm.com>
Signed-off-by: Hayim.Shaul@ibm.com <hayimsha@fhe03.vpc.cloud9.ibm.com>
cc3b877 to
f3ee9fe
Compare
Signed-off-by: Hayim.Shaul@ibm.com <hayimsha@fhe03.vpc.cloud9.ibm.com>
|
@HayimShaul Should we add a test that runs a slow blocking query (e.g. pg_sleep/SLEEP or a fake blocking driver) and asserts that QueryContext/ExecContext is actually interrupted and returns context.Canceled or context.DeadlineExceeded instead of hanging? |
Signed-off-by: Hayim.Shaul@ibm.com <hayimsha@fhe03.vpc.cloud9.ibm.com>
Set a timeout to database queries to protect against database queries that are maliciously designed to take a long time.
Addresses issue #1633