Skip to content

Commit

Permalink
fix: wrong terminal counts calculated during migration check
Browse files Browse the repository at this point in the history
  • Loading branch information
Sidddddarth committed Dec 27, 2024
1 parent 3605e90 commit d40ff5e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion jobsdb/migration.go
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,7 @@ func (jd *Handle) checkIfMigrateDS(ds dataSetT) (
`with combinedResult as (
select
(select count(*) from %[1]q) as totalJobCount,
(select count(*) from %[2]q where job_state = ANY($1)) as terminalJobCount,
(select count(*) from "v_last_%[2]s" where job_state = ANY($1)) as terminalJobCount,
(select created_at from %[1]q order by job_id desc limit 1) as maxCreatedAt,
COALESCE((select exec_time < $2 from %[2]q where job_state = ANY($1) order by id asc limit 1), false) as retentionExpired
)
Expand Down

0 comments on commit d40ff5e

Please sign in to comment.