Skip to content

Commit

Permalink
Extend job delete DB timeout to 10 minutes
Browse files Browse the repository at this point in the history
  • Loading branch information
bolekk committed Nov 12, 2024
1 parent 8bcf868 commit 9187e6f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/services/job/orm.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down

0 comments on commit 9187e6f

Please sign in to comment.