From 9187e6f45caf7288620bc35516e0987e0ecefb0e Mon Sep 17 00:00:00 2001 From: Bolek Kulbabinski <1416262+bolekk@users.noreply.github.com> Date: Tue, 12 Nov 2024 10:51:04 -0800 Subject: [PATCH] Extend job delete DB timeout to 10 minutes --- core/services/job/orm.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/services/job/orm.go b/core/services/job/orm.go index a86da5f7111..25fba139617 100644 --- a/core/services/job/orm.go +++ b/core/services/job/orm.go @@ -714,7 +714,8 @@ func (o *orm) DeleteJob(ctx context.Context, id int32) error { // Added a 1-minute timeout to this query since this can take a long time as data increases. // This was added specifically due to an issue with a database that had a million of pipeline_runs and pipeline_task_runs // and this query was taking ~40secs. - ctx, cancel := context.WithTimeout(sqlutil.WithoutDefaultTimeout(ctx), time.Minute) + // TODO: KS-489 - Remove this timeout once we have a better solution for this. + ctx, cancel := context.WithTimeout(sqlutil.WithoutDefaultTimeout(ctx), 10*time.Minute) defer cancel() query := ` WITH deleted_jobs AS (